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 I can set "en-Us" DateTime format in grid?

Thread ID:





94214 Apr 29,2010 05:05 PM UTC May 19,2010 06:58 AM UTC WinForms 5
Tags: GridControl
Asked On April 29, 2010 05:05 PM UTC

I set for datetime column "en-Us" datetime format:

GridControl.TableDescriptor.Columns[index].Appearance.AnyRecordFieldCell.Format = CultureInfo.CurrentUICulture.DateTimeFormat.ShortDatePattern+ " " + System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat.ShortTimePattern;

but instead of format "M/d/yyyy hh:mm tt" i see datetime in format "M.d.yyyy hh:mm tt", for example for datetime in "en-Us" "2/14/2010 11:00" I get "2.14.2010 11:00"

Replied On May 4, 2010 10:26 AM UTC

for additional information: the language of OS is Russian and short datetime format is 'dd.mm.yyyy'.
Probably that this bug is linked to it?

Jisha Joy [Syncfusion]
Replied On May 6, 2010 05:48 AM UTC


Thank you for your interest in Syncfusion products.

You could try the following code snippets to apply format for DateTime cells and please let me know if this helps.

gridGroupingControl1.TableDescriptor.Columns["date"].Appearance.AnyRecordFieldCell.CellValueType = typeof(DateTime);
gridGroupingControl1.TableDescriptor.Columns["date"].Appearance.AnyRecordFieldCell.Format = "MM/dd/yyyy";


Replied On May 6, 2010 03:07 PM UTC

sorry but it's not help me(

Replied On May 6, 2010 03:21 PM UTC

but I have noticed that when I set date format in OS as "dd/mm/yyyy" that in this case datetime format in grid for "en-us" cunture is "mm/dd/yyyy"...
for example if OS datetime format "13/6/2010" (13 june 2010), that grid form is correct "6/13/2010"

Arulraj A [Syncfusion]
Replied On May 19, 2010 06:58 AM UTC

Hi Vehlf,

Thanks for your interest in Syncfusion Products.

You can solve this by setting the Culture at the application level. This can be done by the below code on Form1_load method.

Application.CurrentCulture = new System.Globalization.CultureInfo("es-ES");

Here is a sample for your reference.



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