GridViewDateTimeColumn How to localize dropdown calendar ?

7 posts, 0 answers
  1. Ramius
    Ramius avatar
    127 posts
    Member since:
    Feb 2008

    Posted 12 Sep 2010 Link to this post

    Hello,

    i use a RadGridView with a GridViewDateTimeColumn.

    How can i localize the dropdown calendar of this column ?

    Kind Regards,

    Ramius

  2. UI for WinForms is Visual Studio 2017 Ready
  3. Ramius
    Ramius avatar
    127 posts
    Member since:
    Feb 2008

    Posted 15 Sep 2010 Link to this post

    Hi Richard,

    thank you for your hints. 

    In the RadGridLocalizationProvider are no RadGridStringID's for the dropdown calendar of the GridViewDateTimeColumn.

    So it is not possible to localize the dropdown calendar of the GridViewDateTimeColumn with the RadGridLocalizationProvider.

    The other way would be to get access to the dropdown calendar of the GridViewDateTimeColumn. 

    I don't know how to get access to the dropdown calendar of the GridViewDateTimeColumn. 

    Kind Regards,

    Ramius

  4. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 15 Sep 2010 Link to this post

    Hi, 

    I'll see if I can see, but it's probably going to need getting access to the calendar via the Default editor (cast as a calendar) for that Filter cell. 
    Richard
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 15 Sep 2010 Link to this post

    Hi, 

    I've found how to get to the calendar part. 
    Use the following URL to get the localization properties
    http://www.telerik.com/help/winforms/calendar_internationalizelocalize.html

    And here is the code. 
    Private Sub GridView_CellBeginEdit(ByVal sender As System.Object, _
        ByVal e As Telerik.WinControls.UI.GridViewCellCancelEventArgs) Handles RadGridView1.CellBeginEdit
     
        Dim editor As RadDateTimeEditor
        Dim element As RadDateTimeEditorElement
     
        editor = TryCast(Me.RadGridView1.ActiveEditor, RadDateTimeEditor)
        If editor IsNot Nothing Then
            element = TryCast(editor.EditorElement, RadDateTimeEditorElement)
            Dim calendarBehavior As RadDateTimePickerCalendar = TryCast(element.GetCurrentBehavior(), RadDateTimePickerCalendar)
            Dim calendar As RadCalendar = TryCast(calendarBehavior.Calendar, RadCalendar)
            calendar.TodayButton.Text = "Hoy"
     
        End If
    End Sub
  6. Ramius
    Ramius avatar
    127 posts
    Member since:
    Feb 2008

    Posted 15 Sep 2010 Link to this post

    Hi Richard,

    thank you for your help. 

    Your solution works fine for me.

    Kind Regards,

    Ramius

  7. Svett
    Admin
    Svett avatar
    728 posts

    Posted 16 Sep 2010 Link to this post

    Hello Guys,

    @Richard: Thank you for your assistance in the forum. Your Telerik points have been updated

    @Ramius: You can use the solution and resources provider by Richard to accomplish your scenario.

    Best wishes,
    Svett
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for WinForms is Visual Studio 2017 Ready