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

Grid Date Time Column Range filter localization

2 Answers 83 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Duygu
Top achievements
Rank 1
Duygu asked on 05 Sep 2012, 11:30 AM
Hi,
 I filtered by datetime column like this http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx 
But i want to change "From" and "To"  texts. how can i do this? 

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Sep 2012, 11:54 AM
Hi,

Please try the following code snippet to change 'to' and 'from' texts.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridFilteringItem)
    {
        GridFilteringItem filterItem = e.Item as GridFilteringItem;
        LiteralControl to = (LiteralControl)filterItem["UniqueName"].Controls[0];
        to.Text = "Your text for to";
        LiteralControl from = (LiteralControl)filterItem["UniqueName"].Controls[3];
        from.Text = "your text for from";
    }
}

Thanks,
Shinu.
0
Duygu
Top achievements
Rank 1
answered on 05 Sep 2012, 12:00 PM
It works :) Thank you very much.
Tags
Grid
Asked by
Duygu
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Duygu
Top achievements
Rank 1
Share this question
or