Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
645
problem igGrid with <Display(Name:="")>
posted

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.

Parents
  • 17559
    posted

    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.

Reply Children
No Data