The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
HAhaneefm Syncfusion Team 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, Haneef
MSMaxim Software SystemsJuly 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.
HAhaneefm Syncfusion Team 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.