Hi,
I'm currently working on a project where I need a radgrid with a couple of date columns. When the grid is in edit mode, the culture of the Datepickers however is always en-US. I need the culture to be nl-BE.
My columns are implemented as follows:
<
Telerik:GridDateTimeColumn
HeaderText
=
"Start Date"
UniqueName
=
"StartDate"
DataType
=
"System.DateTime"
DataFormatString
=
"{0:dd/MM/yyyy}"
></
Telerik:GridDateTimeColumn
>
I have tried setting the page culture, setting the culture of the grid in code and as suggested elsewhere on these forums the approach below
GridEditableItem item = e.Item as GridEditableItem;
RadDatePicker dpStartDate = item["StartDate"].Controls[0] as RadDatePicker;
dpStartDate.Culture = new CultureInfo("nl-BE");
All the datepickers on my form are correctly set to correct culture, except for the ones in the grid.
Am I doing something wrong?
7 Answers, 1 is accepted
You can achieve this by setting a global culture to the page:
<%@ Page Language="C#" AutoEventWireup="true"... Culture="de-DE" %>
Hope this helps. Please give it a try and let me know if it works for you.
Regards,
Eyup
Telerik
Hi Eyup,
As mentioned, I allready tried that. This does work for Datepickers outside of the grid, but not for those on the grid.
Could you try with the UICulture instead?
Or even with the Culture property directly in the RadGrid tag:
<
telerik:RadGrid
...
Culture
=
"de-DE"
>
Looking forward to your reply.
Regards,
Eyup
Telerik
Please check the following resource:
https://msdn.microsoft.com/en-us/library/bz9tc508%28v=vs.80%29.aspx
If the issue remains, I will prepare a sample RadGrid web site and send it to you.
Regards,
Eyup
Telerik
Hi,
Sorry for the late reply, I have been away from this project a little while. I had a look at the resource provided, but the problem remains.
I've created a sample RadGrid web site to test the described behavior. Please run the attached application and let me know about the result.
Regards,
Eyup
Telerik