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

Background color of grid-dropdown

1 Answer 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 12 Sep 2012, 10:59 AM
Hi
How do I change the background color of the dropdown of  grid dropdown column.
Thanks
RT

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Sep 2012, 11:12 AM
Hi Ryan,

Try the following code snippet to give background color for dropdown of GridDropDownColumn.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditableItem && e.Item.IsInEditMode)
    {
         GridEditableItem eitem = (GridEditableItem)e.Item;
         RadComboBox ComboBox = (RadComboBox)eitem["d"].Controls[0];
         ComboBox.DropDownCssClass = "color";
    }
}

CSS:
<style type="text/css">
        .color
        {
            background-color:Red ! important;
        }
</style>

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