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

Context menu on Rad Panes

4 Answers 41 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
Aracna
Top achievements
Rank 1
Aracna asked on 06 Jun 2012, 03:03 AM
I have a context menu as shared resource.
<Window>
 <Window.Resources>
        <!-- Context Menu -->
        <!-- Enabling/Disabling of menu items is controlled by ContextMenuExtensions.OnContextMenuOpened -->
        <Navigation:RadContextMenu x:Key="ViewMenu" x:Shared="true"
                                   Model:ContextMenuExtensions.NotifyOnMenuOpen="True"
                                   ItemClick="MenuViewItemClick">   
 <Navigation:RadMenuItem/>
</Navigation:RadContextMenu  >
<Window.Resources>
<Grid>
<Dock:RadPane>
<Grid Navigation:RadContextMenu.ContextMenu="{StaticResource ViewMenu}">
<Border>
<RadGridView/>
</Border>
</Grid>
</Dock:RadPane>
<Dock:RadPane>
<Grid Navigation:RadContextMenu.ContextMenu="{StaticResource ViewMenu}">
</Grid>
</Dock:RadPane> 

And a floating radpane
The RadGridView has RowDetailsTemplate defined.

Depending on where the mouse is click the contextmenu is shown, and I use the contextmenu.GetClickedElement method.

If I rightclick on the radgridview without opening the floating pane the GetClickedElement is correct. But if I open the floating pane and then rightclick on the radgridview the GetClickedItem is not returned corectly. The Floating Pane is returned even though I clicked on radgridview details.
 What could be a possible issue with this?



4 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 08 Jun 2012, 08:24 AM
Hi,

I tried to reproduce the issue, but to no avail. Could you please give us some code snippets of how the GridView it defined, also the RadContextMenu and Docking control. Ideally, if you could isolate the problem in a sample project and send it to us it will be really helpful for tracking down the source of the issue in a timely manner.

Kind regards,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Aracna
Top achievements
Rank 1
answered on 18 Jun 2012, 06:49 AM
It happens with my code all the time. Also after I close the floating rad pane, I am not able to view the contextmenu on the maindocking panel at all.
0
Aracna
Top achievements
Rank 1
answered on 20 Jun 2012, 08:19 AM
AFter more debugging, The GetClickedElement on Contextmenu is null after I close the Floating radpane.
0
Konstantina
Telerik team
answered on 20 Jun 2012, 08:46 AM
Hi,

What do you mean by the clicked element is correct? The GetClickedElement() method needs a type argument, so if you give the RadGridView you mean it is null? Is that correct?
If you could prepare a simplified project in which this is illustrated and send it to us it will be very helpful for resolving the issue in a timely manner.

Greetings,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
ContextMenu
Asked by
Aracna
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Aracna
Top achievements
Rank 1
Share this question
or