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.
Unfortunately, activation email could not send to your email. Please try again.

Date/Time in DataGrid

Thread ID:





391 Jun 19,2002 09:13 PM Jun 20,2002 03:53 AM Windows Forms 1
Tags: FAQ
Administrator [Syncfusion]
Asked On June 19, 2002 09:13 PM

I have a simple question. When I bind my datagrid to the data table containing "time" fields with date/time datatype, it only gives me the date. I don't want the date because there are no dates in my database. The time is not appearing!

Clay Burch [Syncfusion]
Replied On June 20, 2002 03:53 AM

If you have added a tablestyle to your datagrid, then you can access the columns's columnstyle in the columnstyle collection member of the tablestyle, and set its Format property. The FAQ referenced below shows how you might do this. You would change the format string to somethiing like "mm:ss t". George Shepherd's Windows Forms FAQ contains an entry entitled: How do I format a date column in a datagrid? Check it out at: http://www.syncfusion.com/faq/winforms/search/867.asp


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.