Editform culture issue

8 posts, 0 answers
  1. Ben
    Ben avatar
    14 posts
    Member since:
    Jul 2015

    Posted 04 Aug 2015 Link to this post

    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?

  2. Eyup
    Admin
    Eyup avatar
    3700 posts

    Posted 07 Aug 2015 Link to this post

    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
  3. Ben
    Ben avatar
    14 posts
    Member since:
    Jul 2015

    Posted 07 Aug 2015 in reply to Eyup Link to this post

    Hi Eyup,

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

  4. Eyup
    Admin
    Eyup avatar
    3700 posts

    Posted 07 Aug 2015 Link to this post

    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
  5. Ben
    Ben avatar
    14 posts
    Member since:
    Jul 2015

    Posted 10 Aug 2015 in reply to Eyup Link to this post

    I have tried both, but that didn't work either
  6. Eyup
    Admin
    Eyup avatar
    3700 posts

    Posted 10 Aug 2015 Link to this post

    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
  7. Ben
    Ben avatar
    14 posts
    Member since:
    Jul 2015

    Posted 19 Aug 2015 in reply to Eyup Link to this post

    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.

  8. Eyup
    Admin
    Eyup avatar
    3700 posts

    Posted 24 Aug 2015 Link to this post

    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
Back to Top