We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Details View Context Menu

Thread ID:

Created:

Updated:

Platform:

Replies:

132151 Aug 16,2017 03:55 PM Aug 21,2017 12:18 AM WPF 3
loading
Tags: SfDataGrid
Michael Griffith
Asked On August 16, 2017 03:55 PM

I'm curious to know how to create a context menu for details view only.

Balamurugan Rajaraman [Syncfusion]
Replied On August 17, 2017 09:45 AM

Hi Michael, 
 
Thanks for contacting Syncfusion support. 
 
We have checked your query “Context menu for DetailViewGrid only”. You can able to achieve this requirement by initialize the context menu for the DetailsViewGrid only as like the below provided code sample. 
 
public MainWindow() 
{ 
    InitializeComponent(); 
//à Here we initialize the context menu for details view only 
    this.FirstLevelNestedGrid1.RecordContextMenu = new ContextMenu() { Name = "RecordMenu" }; 
    Binding b = new Binding(); 
    b.Source = this.FirstLevelNestedGrid1.RecordContextMenu; 
    b.Path = new PropertyPath("DataContext"); 
    var menuitem = new MenuItem() { Header = "Copy", Command = new BaseCommand(OnCopyClicked) }; 
    menuitem.SetBinding(MenuItem.CommandParameterProperty, b); 
    this.FirstLevelNestedGrid1.RecordContextMenu.Items.Add(menuitem); 
} 
 
We have the created the sample based upon your requirement and attached that sample for your reference you can able to get it from the below link 
 
 
Please refer the below link for getting information about the Context menu 
 
Regards, 
Balamurugan R 


Michael Griffith
Replied On August 18, 2017 01:35 PM

Thanks again.


Balamurugan Rajaraman [Syncfusion]
Replied On August 21, 2017 12:18 AM

Hi Michael, 
 
Thanks for the update. 
 
Please let us know if you need any further assist on this. 
 
Regards, 
Balamurugan R 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;