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

[Solved] background color to filter textbox

1 Answer 141 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 31 May 2013, 12:33 PM
Hi
How can I get the filter textbox from code behind and give background color to it.

thanks in advance
RT

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 31 May 2013, 12:49 PM
hi,

Please try the following code snippet to change the BackGround color for filter textbox.

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

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