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

Changing CommandItemStyle on internal skin

1 Answer 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 30 Jan 2009, 08:48 AM
Hi,

I have a radgrid which is currently using the inox skin. I have a commanditemtemplate setup, but I want to change it's backcolor from the bluish hatched pattern.

I'm trying to change the back colour to a pure black. If I change the CommandItemStyle backcolour, the result is black, but with a hatched pattern.

Is the skin overriding the pattern, as I can't see what property can change the hatching to a solid colour.

thanks

Bobby

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 30 Jan 2009, 10:31 AM
Hello Bobby,

Try setting the style in the CssClass using server-side code as shown below:
cs:
 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridCommandItem) 
        { 
            GridCommandItem cmdItem = (GridCommandItem)e.Item; 
            cmdItem.CssClass = "commandRow"
        }         
    }  
 

css:
<head runat="server"
   <title></title>  
   <style type="text/css" >   
     .commandRow 
       { 
     background:Black !important; 
       } 
    </style>  

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