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

GridDateTimeColumn From To Localization

3 Answers 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Audreyn Justus
Top achievements
Rank 1
Audreyn Justus asked on 25 Jul 2013, 08:00 PM
Hello

How to localize/translate the terms "From" and "To"  that appear inside the filter area of GridDateTimeColumn? There is no entry related in the Global Resources file.

Regards

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 26 Jul 2013, 05:19 AM
Hi ,

Please try the following code snippet to achieve your scenario.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridFilteringItem)
    {
        GridFilteringItem fitem = (GridFilteringItem)e.Item;
        foreach (GridColumn col in RadGrid1.MasterTableView.RenderColumns)
        {
            if (col.ColumnType == "GridDateTimeColumn")
            {
                LiteralControl LiteralFrom = (LiteralControl)fitem[col.UniqueName].Controls[0];
                LiteralFrom.Text = "From Date:";
                LiteralControl LiteralTo = (LiteralControl)fitem[col.UniqueName].Controls[3];
                LiteralTo.Text = "To Date:";
            }
        }
    }
}

Thanks,
Princy
0
Audreyn Justus
Top achievements
Rank 1
answered on 26 Jul 2013, 01:04 PM
Thank you Princy.

It will do the job for now.  As a suggestion, for a future release, it will interesting if these literals obey the standard and get their values from the resource files, as the other controls inside the RadGrid.
0
Eyup
Telerik team
answered on 31 Jul 2013, 08:35 AM
Hello Audreyn,

You can log it as a feature request so our developers will consider improving it for the future releases:
http://www.telerik.com/feedback/ajax

Thank you for your feedback.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Audreyn Justus
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Audreyn Justus
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or