How to customize the context menu?

Posted by: info on 10 May 2022, 11:31 pm EST

  • Posted 10 May 2022, 11:31 pm EST

    Hello.

    C1.WPF.Grid.Ja 6.0.20221.218

    How to customize the context menu on the FlexGrid?
    Sometimes a default context menu is also displayed.


    <c1:FlexGrid ItemsSource="{Binding List}">
    <c1:FlexGrid.ContextMenu>
    <ContextMenu>
    <MenuItem Header="AAAAAAAAAA" />
    </ContextMenu>
    </c1:FlexGrid.ContextMenu>
    </c1:FlexGrid>
  • Marked as Answer

    Replied 11 May 2022, 3:36 pm EST

    Hi,

    Thanks for the snapshot.

    We have replicated this behavior at our end. This seems like a bug. So, that we have escalated it to the development team. We will get back to you once we have any update from them. [Internal Track Id - C1XAML-29447]

    As a workaround, you can disable the default context menu popup by handling PreviewMouseRightButtonDown event of Flexgrid as:(See code snippet)


    private void Grid_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
    {
    e.Handled = true;
    }


    Please refer the attached sample for the same:FlexContexMenuDemo.zip

    Best Regards,
    Nitin.
  • Replied 11 May 2022, 11:32 pm EST

    Thank you. It works. I will wait for the fix.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels