Search code examples
vb.netdatetimeinfragisticsdatetime-formatultrawingrid

DateTime format in Ultragrid column


I have set a specific format for a column in an Ultragrid. But still the DateTime is in its default format.

//Code

 UltraGridColumn.Header.ToolTipText = Field.FieldDescription
 UltraGridColumn.Format = "d"

Even after the above format is set the grid shows the value in the column as 06/06/2013 02:43PM

But the expected output is 06/06/2013

Why i'm getting this?


Solution

  • Added the column style as DateTime.

    //Code

     UltraGridColumn.Style = ColumnStyle.DateTime