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

Format a date in a bound datagrid

How do I format a date in a bound datagrid? I've tried changing the styleinfo of a boundcolumn but it keeps giving me the basic format. By the way, it is bound to a typed dataset. I want to see the date and time.

4 Replies

AD Administrator Syncfusion Team November 26, 2002 03:30 PM

Setting the StyleInfo.Format in the GridBoundColumn is the proper way to do this, but there is a bug in version 1.5 that prevents this format from 'taking'. This problem will be corrected in a 1.5.1 patch release in the next day or so.


SB Soung Bae December 4, 2002 01:02 PM

I just wanted to ask you if this issue was fixed with the new patch? > How do I format a date in a bound datagrid? > > I've tried changing the styleinfo of a boundcolumn but it keeps giving me the basic format. > > By the way, it is bound to a typed dataset. > > I want to see the date and time.


AD Administrator Syncfusion Team December 4, 2002 01:42 PM

Yes. Stefan


SB Soung Bae December 4, 2002 01:58 PM

> Yes. > > Stefan Thanks. I figured out a way to do this without a typed dataset using grdResults.Binder.InternalColumns[1].StyleInfo.CellValueType = typeof(DateTime); grdResults.Binder.InternalColumns[1].StyleInfo.Format = "ddMMMyyyy";

Loader.
Live Chat Icon For mobile
Up arrow icon