Hi,
I'm working with Code First to create the model which cometh my igGrid.When I wanted to hide columns, I used the firts code annotations, such as:<Display(AutoGenerateField:=False)>This entry grid respects me, but when I want to change the name of the property, and for that I use the notation:<Display(Name:="Name change")>When igGrid creates the table and paint the names of the properties, I respesta this annotation.Why can it be?I tested whether the problem was in the annotation, using in this view:@ Html.LabelFor (Function (model) model.Codigo)And I displayed the name of the property that had put the annotation.
Thanks in advance.
Best regards.
Elena Guillén.
Hello Elena,
You could try to change the header text directly in the igGrid like this:
@(Html.Infragistics().Grid(Model.Customers.AsQueryable()).Columns(column =>
{
column.For(x => x.ID).HeaderText("Product ID").Width("100px");
column.For(x => x.Name).HeaderText("Product Name").Width("250px");
})
.Width("400px")
.DataBind()
.Render()
)
Please let me know if this helps.
If you still need any assistance on the matter do not hesitate to ask.