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

style headercontextmenu

2 Answers 26 Views
Grid
This is a migrated thread and some comments may be shown as answers.
dingen
Top achievements
Rank 1
dingen asked on 09 Dec 2009, 02:03 AM
Hi

I am trying to change the style of my headercontextmenu since it is transparent now on the RadGrid. How can i change this?

thanks

Dirk

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 09 Dec 2009, 06:07 AM
Hello Dirk,

Try out the following code to set styles for your grid's HeaderContextMenu:
c#:
protected void Page_Load(object sender, EventArgs e) 
    {         
        RadGrid1.HeaderContextMenu.ItemCreated += new RadMenuEventHandler(HeaderContextMenu_ItemCreated);        
    } 
 
    void HeaderContextMenu_ItemCreated(object sender, RadMenuEventArgs e) 
    { 
        e.Item.CssClass = "myHeaderContextMenu";  
    } 

css:
.myHeaderContextMenu 
  {        
      background-color:Gray !important; 
      color:White !important; 
  } 

Thanks
Princy.
0
Raj
Top achievements
Rank 1
answered on 11 Mar 2013, 04:25 PM
Thanks Princy. Works for me :)
Tags
Grid
Asked by
dingen
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Raj
Top achievements
Rank 1
Share this question
or