Unable to pop up context menu

use  TreeGridTemplateColumn  

Right click cannot pop up






thanks


1 Reply

VS Vijayarasan Sivanandham Syncfusion Team October 27, 2021 02:31 PM UTC

Hi

Thank you for contacting Syncfusion Support.

Based on provided information we suspect that Expander cell does not show context menu in SfTreeGird. This is your reported issue in this case you need to set the contexmenu for Expander by using ExpanderContextMenu in SfDataGrid. Please refer the below code snippet, 

<!--ContextMenu for other columns--> 
<syncfusion:SfTreeGrid.RecordContextMenu> 
                <ContextMenu> 
                    <MenuItem x:Name="Cut" Header="Cut" /> 
                    <MenuItem x:Name="Copy" Header="Copy"  /> 
                    <MenuItem x:Name="Paste" Header="Paste" /> 
                    <MenuItem x:Name="Delete" Header="Delete" /> 
                </ContextMenu> 
       </syncfusion:SfTreeGrid.RecordContextMenu> 
<!--ContextMenu for Expander Column--> 
<syncfusion:SfTreeGrid.ExpanderContextMenu> 
                <ContextMenu> 
                    <MenuItem x:Name="expanderColumnCut" Header="Cut" /> 
                    <MenuItem x:Name="expanderColumnCopy" Header="Copy"  /> 
                    <MenuItem x:Name="expanderColumnPaste" Header="Paste" /> 
                    <MenuItem x:Name="expanderColumnDelete" Header="Delete" /> 
                </ContextMenu> 
</syncfusion:SfTreeGrid.ExpanderContextMenu> 

Sample Link: https://www.syncfusion.com/downloads/support/forum/169933/ze/Sample285735672

For more information related to ContextMenu for expander, please refer the below user guide documentation 

UG Link: https://help.syncfusion.com/wpf/treegrid/interactive-features#contextmenu-for-expander

Please let us know if you have any concerns in this. 

Regards, 
Vijayarasan S 


Loader.
Up arrow icon