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.

How I can set "en-Us" DateTime format in grid?

Thread ID:





94214 Apr 29,2010 01:05 PM May 19,2010 02:58 AM Windows Forms 5
Tags: GridControl
Asked On April 29, 2010 01:05 PM

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 06:26 AM

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 01:48 AM


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 11:07 AM

sorry but it's not help me(

Replied On May 6, 2010 11:21 AM

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 02:58 AM

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.

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.