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

How to display a custom context menu for NestedViewTemplate

4 Answers 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jason Rosensweig
Top achievements
Rank 1
Jason Rosensweig asked on 21 Sep 2010, 09:41 PM
I am using a NestedViewTemplate in a grid that has a custom context menu. Right-clicking anywhere within the NestedViewTemplate does not trigger the context menu of the main grid as right-clicking on a row does. Is it possible to do this?

4 Answers, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 27 Sep 2010, 08:48 AM
Hello Jason,

In order to implement the desired functionality, please add the RadGrid to the targets of the RadMenu:
<telerik:RadContextMenu ID="RadMenu1" runat="server" OnItemClick="RadMenu1_ItemClick"
    EnableRoundedCorners="true" EnableShadows="true">
    <Targets>
        <telerik:ContextMenuElementTarget ElementID="RadGrid1" />
    </Targets>
</telerik:RadContextMenu>

I have also prepared a sample project for you demonstrating how this works. You can find it attached to this message.

I hope this helps.

Sincerely yours,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jason Rosensweig
Top achievements
Rank 1
answered on 29 Sep 2010, 03:42 PM
This isn't exactly what I meant. I have a nestedviewtemplate that does not contain an additional grid. It simply contains some text and html tags. I would like the nestedviewtemplate to behave as the grid row in regard to the context menu. Meaning when i right click anywhere in the nestedviewtemplate i would like the same context menu to fire, passing the row key ID, as the one attached tot he grid row. Basically I would like the nestedviewtemplate to behave as if it were a standard grid row. Is this possible?
0
Accepted
Mira
Telerik team
answered on 30 Sep 2010, 01:47 PM
Hello Jason,

I have followed your scenario and prepared a sample project for you demonstrating how the desired functionality can be implemented. You can find it attached to this message.

Please take a look at it and let me know whether it helps.

Regards,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jason Rosensweig
Top achievements
Rank 1
answered on 01 Oct 2010, 12:02 AM
That did it! Thanks! You guys rock! (waaaaay better than DevExpress support...I'm just sayin')
Tags
Grid
Asked by
Jason Rosensweig
Top achievements
Rank 1
Answers by
Mira
Telerik team
Jason Rosensweig
Top achievements
Rank 1
Share this question
or