When the grid runs in a german version of IE on a german version of the operating system, date columns show their dates using periods separating the day, month and year. What I really want is the format to be whatever I set it to be on the server using whatever regional setting applies to the user. The regional setting is independent of the browser's language or the language of the operating system. It is a web application setting specific for the user. Here is my code example:
DateTimeFormatInfo dateTimeFormat = new CultureInfo("en-us", false).DateTimeFormat; |
GridDateTimeColumn colSessionStartTime = this.RadGridSkillsData.Columns.FindByUniqueName("SessionStartTimeLocal") as GridDateTimeColumn; |
colSessionStartTime.DataFormatString = "{0:" + dateTimeFormat.ShortDatePattern + " " + dateTimeFormat.LongTimePattern + "}"; |
When I view what colSessionStartTime.DataFormatString is set to, it shows up as:
"{0:M/d/yyyy h:mm:ss tt}"
Yet the values that appear in the grid are showing periods rather than slashes for the date.
How can I get the date to format according to any culture code?
Johann