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

Assign different CSS to each column of filter row

1 Answer 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 19 Aug 2011, 03:39 AM
Hi,

For RadGrid, is there a way to assign different CSS to each column of the filter row?

I can assign CSS class to Header, Footer and Item columns by changing HeaderStyle.CssClass, FooterStyle.CssClass and ItemStyle.CssClass. But I don't know how to do that to Filter Row column.

TIA 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 19 Aug 2011, 08:10 AM
Hello Matt,

Try setting the following code snippet.
C#:
protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
 {
  if (e.Item is GridFilteringItem)
   {
     GridFilteringItem filteringItem = e.Item as GridFilteringItem;
     TextBox box = filteringItem["ColumnUniqueName"].Controls[0] as TextBox;
     box.BackColor = System.Drawing.Color.Red;
   }
 }

Thanks,
Shinu.
Tags
Grid
Asked by
Matt
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or