Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
86 views

I have a RadGrid with a GridDateTimeColumn.

This GridDateTimeColumn has EnableRangeFiltering="true" to display the filter :

<telerik:GridDateTimeColumn DataField="xxx" HeaderText="xxx" AutoPostBackOnFilter="true" 
                    SortExpression="xxx" UniqueName="xxx" PickerType="DatePicker"
                    DataFormatString="{0:D}" EnableRangeFiltering="true" ShowFilterIcon="false">
                </telerik:GridDateTimeColumn>

I have changed the currentCulture of the thread to display calendar in French.

But, if I click on the selected month, I have another popup to choose month and years :

I would like to change the label of the three button "Today", "Ok" and "Cancel".


I have access to the RadDatePicker with the RadGrid OnItemDataBound function, but the following code doesn't work :

protected void RadGrid_OnItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
               ...
            } else if (e.Item is GridFilteringItem)
            {
                GridFilteringItem filterItem = e.Item as GridFilteringItem;
                var columns = filterItem.OwnerTableView.RenderColumns
                    .OfType<GridDateTimeColumn>()
                    .Where(x => x.AllowFiltering && x.EnableRangeFiltering);

                System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fr-FR");

                foreach (GridColumn col in columns)
                {
                    ...
                    RadDatePicker picker = filterItem[col.UniqueName].Controls[1] as RadDatePicker;
                    picker.Calendar.FastNavigationSettings.CancelButtonCaption = "Annuler";
                    ...
                }
            }
        }

Someone knows how I can access on this three button in my c# code to change this property ?

 

Thanks

Ludovic
Top achievements
Rank 1
Iron
 answered on 10 Feb 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?