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

Disable HeaderContextMenu on some columns

2 Answers 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
FISCAL
Top achievements
Rank 1
FISCAL asked on 15 Jun 2010, 12:03 PM
Hi,

Is it possible to disable "HeaderContextMenu" on Rad Grid columns? It doesn't make sense to have it on all columns.

Many thanks

M G

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Jun 2010, 01:01 PM
Hello,

You can disable HeaderContextMenu for some columns by using OnHeaderMenuShowing client event.

ASPX:
  
 <ClientSettings> 
     <ClientEvents OnHeaderMenuShowing="OnHeaderMenuShowing" /> 
 </ClientSettings> 

Java Script:
<script type="text/javascript"
 function OnHeaderMenuShowing(sender, eventArgs) 
       { 
        var headerName = eventArgs.get_gridColumn().get_uniqueName(); 
        if (headerName == "ColumnUniqueName")  
          { 
            eventArgs.set_cancel(true); 
          } 
       } 
</script> 
 

Regards,
Shinu.


0
FISCAL
Top achievements
Rank 1
answered on 15 Jun 2010, 02:36 PM
Thanks  Shinu!
Tags
Grid
Asked by
FISCAL
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
FISCAL
Top achievements
Rank 1
Share this question
or