Context menu on Rad Panes

5 posts, 0 answers
  1. Aracna
    Aracna avatar
    22 posts
    Member since:
    Jun 2012

    Posted 05 Jun 2012 Link to this post

    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?



  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 08 Jun 2012 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Aracna
    Aracna avatar
    22 posts
    Member since:
    Jun 2012

    Posted 18 Jun 2012 Link to this post

    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.
  5. Aracna
    Aracna avatar
    22 posts
    Member since:
    Jun 2012

    Posted 20 Jun 2012 Link to this post

    AFter more debugging, The GetClickedElement on Contextmenu is null after I close the Floating radpane.
  6. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 20 Jun 2012 Link to this post

    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 >>
Back to Top
UI for WPF is Visual Studio 2017 Ready