ASP.net MVC dotn display a column
Using LINQ to SQL class
[MetadataType(typeof(ProductMetadata))]
public pertial class Product
{
…
}
public class ProductMetadata
{
…
}
A.
Add the following attribute to Product class
[DisplayColumn(“DiscontinueDate”,”DiscontinueDate”,false)
B.
Add the following attribute to ProductMetadata class
[DisplayColumn(“DiscontinueDate”,”DiscontinueDate”,false)
C.
Add the following code segment Product class
public bool ScaffoldDisable()
{
return false;
}
D.
ProductMetaData class
[ScaffoldColumn(false)]
public object DiscontinueDate;