Hide a column in GridView doesn't work in EF6

193 Views Asked by At

i create a model using EF6 . I want to invisible my column in Gridview window form using this code :

  [ScaffoldColumn(false)]
  [Display(AutoGenerateField = false)]
  public Nullable<System.DateTime> Date { get; set; }

I used both of [ScaffoldColumn(false)] and [Display(AutoGenerateField = false)].but it doesn't work and the column Date is shown again in gridview.

why ?

Best regards

0

There are 0 best solutions below