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

GridViewDateTimeColumn How to localize dropdown calendar ?

6 Answers 99 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ramius
Top achievements
Rank 1
Ramius asked on 12 Sep 2010, 03:23 PM

Hello,

i use a RadGridView with a GridViewDateTimeColumn.

How can i localize the dropdown calendar of this column ?

Kind Regards,

Ramius

6 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 14 Sep 2010, 03:28 PM
0
Ramius
Top achievements
Rank 1
answered on 15 Sep 2010, 10:15 AM

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

0
Richard Slade
Top achievements
Rank 2
answered on 15 Sep 2010, 10:44 AM
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
0
Richard Slade
Top achievements
Rank 2
answered on 15 Sep 2010, 11:21 AM
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
0
Ramius
Top achievements
Rank 1
answered on 15 Sep 2010, 02:21 PM

Hi Richard,

thank you for your help. 

Your solution works fine for me.

Kind Regards,

Ramius

0
Svett
Telerik team
answered on 16 Sep 2010, 12:47 PM
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
Tags
GridView
Asked by
Ramius
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Ramius
Top achievements
Rank 1
Svett
Telerik team
Share this question
or