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

Customizing icon toolitp when filtering radgrid

2 Answers 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gaetan
Top achievements
Rank 1
Gaetan asked on 25 Nov 2015, 02:12 PM

Good morning,

Is there anyway to change the tooltip of the filter icon of a radgrid column, so that it displays the current filter (i.e. 'contains', 'starts with', ...)?

thanks a lot,

Gaetan

2 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 30 Nov 2015, 09:07 AM
Hi Gaetan,

You can use the following approach to achieve this requirement:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridFilteringItem)
    {
        GridFilteringItem item = e.Item as GridFilteringItem;
        foreach (GridColumn col in RadGrid1.MasterTableView.RenderColumns
            .OfType<IGridDataColumn>().Where(x => x.AllowFiltering))
        {
            Button button = item[col.UniqueName].FindControl("Filter_" + col.UniqueName) as Button;
            button.ToolTip = col.CurrentFilterFunction.ToString();
        }
    }
}

Hope this helps. Please give it a try and let me know if it works for you.

Regards,
Eyup
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Gaetan
Top achievements
Rank 1
answered on 30 Nov 2015, 09:58 AM
Hello Eyup,
worked like a charm, thanks a lot.
Gaetan
Tags
Grid
Asked by
Gaetan
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Gaetan
Top achievements
Rank 1
Share this question
or