This is a migrated thread and some comments may be shown as answers.

Editform culture issue

7 Answers 21 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 04 Aug 2015, 01:20 PM

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

Sort by
0
Eyup
Telerik team
answered on 07 Aug 2015, 09:09 AM
Hi Ben,

You can achieve this by setting a global culture to the page:
Copy Code
Copy Code
<%@ 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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ben
Top achievements
Rank 1
answered on 07 Aug 2015, 09:16 AM

Hi Eyup,

As mentioned, I allready tried that. This does work for Datepickers outside of the grid, but not for those on the grid.

0
Eyup
Telerik team
answered on 07 Aug 2015, 09:54 AM
Hi Ben,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ben
Top achievements
Rank 1
answered on 10 Aug 2015, 07:54 AM
I have tried both, but that didn't work either
0
Eyup
Telerik team
answered on 10 Aug 2015, 02:38 PM
Hi Ben,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ben
Top achievements
Rank 1
answered on 19 Aug 2015, 06:32 AM

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.

0
Eyup
Telerik team
answered on 24 Aug 2015, 07:22 AM
Hi Ben,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Ben
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Ben
Top achievements
Rank 1
Share this question
or