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

no time for DateTime type in Databroudgrid

Thread ID:





14222 May 21,2004 12:11 PM UTC May 21,2004 12:51 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On May 21, 2004 12:11 PM UTC

Hi, I used databoundgrid with dataset as data source. After I query the database and load the data, it seems the grid will put DateTime type data in a DateTimePicker. And I can only see date(as 5/20/04). Is there any way for me to see the time only( or at least Date with time)? I had a look on the samples and tried to define the col type as DateTime, but it did not work out. Thanks a lot Chris

Administrator [Syncfusion]
Replied On May 21, 2004 12:51 PM UTC

By default, the GridDataBoundGrid places a MonthCalendar cell control if you column has datatype of DateTime. And, this control does not allow you to set the time. But you can see the time by providing the proper GridBoundColumn.StyleInfo.Format property that includes the time. This sample shows this formatting and hides the button so the user cannot drop the calendar and kill the time. Forum_DateTime_3465.zip If you want to use a DateImePicker in the cell (instead of the deafult MonthCalendar), here is a KB article that contains a custom cell type that does this. http://www.syncfusion.com/Support/article.aspx?id=10435


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon