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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to format a DateTime as text with no dropdown in a GGC (GridGroupingControl)

Thread ID:





91338 Nov 13,2009 06:28 AM UTC Nov 13,2009 12:06 PM UTC ASP.NET Web Forms (Classic) 1
Tags: GridGroupingControl
Administrator [Syncfusion]
Asked On November 13, 2009 06:28 AM UTC

We have a requirement for a column in a GridGroupingControl to display a full date time in full format "dd/MM/yyyy h:mm:ss tt". Note that this is a read-only grid so we don't need users to be able to edit anything.

By default GGC columns bound to a DateTime display as "dd/MM/yyyy" and have a drop down that displays a date picker control. I've been able to disable the date picker control, and when you actually select a cell it displays as "dd/MM/yyyy h:mm:ss tt", but cells that are not selected are shown in "dd/MM/yyyy" format.

I've tried changing heaps of different properties and googling but can't find the solution. What property or properties need to be set to display full date and time in DateTime columns, rather than just dates?

Gowri Manohari D [Syncfusion]
Replied On November 13, 2009 12:06 PM UTC

Hi Ben,

Thank you for choosing Syncfusion Products.

We have created sample for your requirement. The sample which i have created will display the "DateTime" column with "dd/mm/yyyy h:mm:ss tt" format. All the formatting will be done in GridGroupingControl1_QueryStyleInfo event. Please refer the code snippet for more details

void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
if(e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell || e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell)
if(e.TableCellIdentity.Column.Name == "Birthdate" )
e.Style.Format = "dd/MM/yyyy h:mm:ss tt";
e.Handled = true;

Please find the sample from below link


Let me know if you have any other queries.



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

or the page will be automatically redirected to 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