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

[Solved] COntext Menu

2 Answers 111 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
smith
Top achievements
Rank 1
smith asked on 13 Apr 2009, 09:40 AM
HI

I am using GridView Context menu  , i want to implement context menu on my gridview , based on the column click

if i select the row and selected particular column then contextmenu will dispaly other column no need to dispaly context menu,

based column click need to implement different context menus


pls send some code 

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 Apr 2009, 03:17 PM
Hello smith,

In this example the context menu is attached to the grid row however you can loop on row cells and attach menu only on desired cell.
    
Greetings,
Vlad
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
smith
Top achievements
Rank 1
answered on 14 Apr 2009, 05:07 AM

 

HI
I tried loop through columwise conext menu in gridview ,  but both the contex menu is coming while right click
please correct that code

if
(e.GridViewItemsControl.RecordManager.FieldDescriptors[3].UniqueName == "FailureMode")

 

{

 

// create menu items

 

rowContextMenu.Items.Add(

new RadMenuItem() { Header = "Add Failure Mode" });

 

}

 

if (e.GridViewItemsControl.RecordManager.FieldDescriptors[4].UniqueName == "EffectName")

 

{

 

// create menu items

 

rowContextMenu.Items.Add(

new RadMenuItem() { Header = "EffectName" });

 

}


Smith             

Tags
GridView
Asked by
smith
Top achievements
Rank 1
Answers by
Vlad
Telerik team
smith
Top achievements
Rank 1
Share this question
or