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 set CultureInfo for MonthCalendar cell type

Thread ID:





64256 Jul 17,2007 03:15 PM UTC Jul 17,2007 10:19 PM UTC WinForms 3
Tags: GridControl
Maxim Software Systems
Asked On July 17, 2007 03:15 PM UTC

Is it possible to set the CultureInfo for the MonthCalendar control cell type? When I set a grid cell's type to MonthCalendar, it ignored the custom CultureInfo value I set for the cell and seems to use the Windows regional settings instead.

haneefm [Syncfusion]
Replied On July 17, 2007 03:59 PM UTC

Hi Don,

Is it possible to set the CultureInfo for the MonthCalendar control cell type?
You can try these code:

this.grid[1,1].CellType = "MonthCalendar";
this.grid[1,1].CellValueType = typeof(DateTime);
this.grid[1,1].CultureInfo = new System.Globalization.CultureInfo("zh-HK");

Best regards,

Maxim Software Systems
Replied On July 17, 2007 06:55 PM UTC

That sort of worked. The date I select in the MonthCalendar now gets put into the cell in the proper format (dd/mm/yyyy as opposed to my Windows setting of mm/dd/yyyy), but I am now getting an "date format not recognized" error after that. It's as if the cell is validating the date that the calendar is returning, using a different CultureInfo to do it.

haneefm [Syncfusion]
Replied On July 17, 2007 10:19 PM UTC

Hi Don,

The GridStyleInfo.Format property string used to format the text to display in the grid. you can specify the numeric format string, Date format string or enumeration format string by using this property. Below is a code snippet that set the "MM/dd/yyyy" format.

this.gridControl1[1, 1].Format = "MM/dd/yyyy";

Best regards,


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