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

set color to filter textbox

1 Answer 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryann
Top achievements
Rank 1
Ryann asked on 02 Jan 2014, 01:14 PM
Hi,
How to set color to filter textbox?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 02 Jan 2014, 01:20 PM
Hi Ryann,

Please try the following code snippet:

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
  if (e.Item is GridFilteringItem)
  {
     GridFilteringItem filter = (GridFilteringItem)e.Item;
     TextBox txt = (TextBox)filter["ColumnUniqueName"].Controls[0];
     txt.BackColor = Color.Red;
  }
}

Thanks,
Princy
Tags
Grid
Asked by
Ryann
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or