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

Radgrid Filter has RadNumericTextBox change background color

2 Answers 138 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Asif
Top achievements
Rank 1
Asif asked on 01 Oct 2011, 05:50 AM
Hello Support

I have an radgrid in which I have enable filter option on one column. And in filter textbox as RadNumericTextbox, every thing works fine but the Radnumerictextbox background color is always black which I want to make it White but it doesn't happens. Following code I have tried

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridFilteringItem)
        {
            GridFilteringItem filterItem = e.Item as GridFilteringItem;
            RadNumericTextBox txtNumber = (RadNumericTextBox)filterItem["S1"].Controls[0];
            txtNumber.BackColor = System.Drawing.Color.White;
        }
    }

Please check and tell me what made it wrong...

Regards

ASIF

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 03 Oct 2011, 08:29 AM
Hi Asif,

I suppose you set the skin of RadGrid as "Black". I tried the same but I am not able to reproduce that in ItemDataBound event. One approach is set the CSS like below.

CSS:

<style type="text/css">
       .riTextBox
       {
           background:none !important;
           background-color:White !important;
       }
</style>

Thanks,
Princy.
0
Asif
Top achievements
Rank 1
answered on 03 Oct 2011, 10:21 AM
Thanks

It has helped me out
Tags
Grid
Asked by
Asif
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Asif
Top achievements
Rank 1
Share this question
or