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

Skin for GridDropDownColumn

2 Answers 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eliyahu Goldin
Top achievements
Rank 1
Eliyahu Goldin asked on 20 Aug 2008, 07:49 AM
I set theme Web20 for the whole application but I want my GridDropDownColumn to look like a RadCombobox with skin Vista. I don't seem to find any property for that.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 20 Aug 2008, 09:49 AM
Hi,

Try the following code snippet to access the RadComboBox of a GridDropDownColumn  in the  code behind and set the skin .

ASPX:
  <telerik:GridDropDownColumn UniqueName="DropCol" HeaderText="DropCol"  ></telerik:GridDropDownColumn> 
                     

CS:
    protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
    { 
        if ((e.Item is GridEditableItem)&&(e.Item.IsInEditMode)) 
        { 
            GridEditableItem item = (GridEditableItem)e.Item; 
            RadComboBox combo = (RadComboBox)item["DropCol"].Controls[0]; 
            combo.Skin = "Black"
        } 
 
    } 


Thanks
Shinu.
0
Eliyahu Goldin
Top achievements
Rank 1
answered on 20 Aug 2008, 06:55 PM
Thank you.

I thought there could be a more declarative way.

Anyway, I think I understand why Telerik didn't implement it. Setting another skin doesn't play well with the rest of the styles on the EditingForm. In my case, EditingForm styling in theme Web20 includes some blue border on text input and it overlaps with the Vista skin. Having spent a while trying to get rid of the blue border, I ended up with reversing to DropDownControlType="DropDownList".

Tags
Grid
Asked by
Eliyahu Goldin
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Eliyahu Goldin
Top achievements
Rank 1
Share this question
or