We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to format a column, i need to display Time("HH::mm") format.

i have a gridboundcolumn
i want to format it like "HH:mm"


pls provide a solution
thanks
Ginu

1 Reply

AD Administrator Syncfusion Team January 4, 2007 08:29 AM UTC

Hi Ginu,

You can set StyleInfo.Format property for formatting the cell values. You can specify the numeric format string, Date format string or enumeration format string. Here is a code snippet to show the "HH:mm" format.

this.gridDataBoundGrid1.Binder.InternalColumns["ColumnName"].StyleInfo.CellValueType = typeof(DateTime);
this.gridDataBoundGrid1.Binder.InternalColumns["ColumnName"].StyleInfo.Format = "HH:mm";

Sample : FormatSample

Also refer our shipped TextFormat browser sample for more details.
[install path:]\Syncfusion\Essential Studio\4.3.0.25\windows\Grid.Windows\Samples\Quick Start\TextFormat\

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon