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

Issue with changing the background of active filter #2

1 Answer 29 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ozonemojo2
Top achievements
Rank 1
ozonemojo2 asked on 14 Feb 2014, 07:39 AM
This issue http://www.telerik.com/forums/issue-with-changing-the-background-of-active-filter#8qeqk4W15k-RS15ZY2UuRA does not work if I apply more than one filter in cascade (only one column is affected)
Could you help me?
Thanks

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 19 Feb 2014, 11:34 AM
Hello Andrea,

You can use the following approach:
protected void RadGrid1_DataBound(object sender, EventArgs e)
{
    foreach (GridColumn col in RadGrid1.MasterTableView.RenderColumns)
    {
        string exp = col.EvaluateFilterExpression();
        col.HeaderStyle.BackColor = string.IsNullOrEmpty(exp) ?
              Color.Empty : Color.LightBlue;
    }
}

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

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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
ozonemojo2
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or