Skip to content

Replies

0
Sanjay
Sanjay answered on Nov 5, 2012 5:24 PM

Yes the columns are autogenerated and there are over 100 of columns.

Out of those 100 columns lets say I want to format 2 columns which are of type DATETIME


As per your comment, I tried defining only a single column explicitly as below:

@(Html.Infragistics().Grid<Data>(Model.DataCollection).ID("mGrid")

       .AutoGenerateColumns(true)

        .Columns(col =>
                  {
                             col.For(x => x.CreateDate).HeaderText("CreateDate").DataType("date").Format("MM-dd-yyyy h:mm:ss tt");
                   }
         )
        .Height("600px")
        .DataBind()
        .Render()
)

The above code only renders the explicitly defined column and does not render the remaining ones although AUTOGENERATECOLUMNSis set to TRUE.

0
Sanjay
Sanjay answered on Nov 2, 2012 7:17 PM

Hi Tsvetelina,

It looks like we can give format options while specifying the columns.

What if I have hundreds of columns in the grid ?? Is there any way to specify only columns to which I want to apply for format ??

0
Sanjay
Sanjay answered on Oct 3, 2012 7:26 PM

Thanks a ton Martin.