Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
471
How to keep the context menu in mouse left click
posted

Hi all,

  I kep the context menu in  my grid..when i cllcik the any menu in my context menu  iam not getting any  active record..how to keep the context menu in left cliick..While I  clicking  the grid left clcik then the grid gives active record..

<igDP:XamDataGrid.ContextMenu>
 
<ContextMenu x:Name="Contextmenu" Loaded

="Contextmenu_Loaded">
 
<MenuItem Name="Add" Header="Create Applet" Click="mnuAdd_Click"/>
 
<MenuItem Name="Edit" Tag="{Binding Path=DataItem.AppletIntID}" Header="Update Applet" Click="mnuEdit_Click"/>


<MenuItem Name="Delete" Tag="{Binding Path=DataItem.AppletIntID}" Header="Delete Applet" Click="mnuDelete_Click"/>

<Separator/>
 
<MenuItem Name="View" Tag="{Binding Path=DataItem.AppletIntID}" Header="View Applet" Click

="View_Click"/>
 
</ContextMenu>

 </igDP:XamDataGrid.ContextMenu>

class  file code:

private void mnuEdit_Click(object sender, RoutedEventArgs e)
{

DataRecord activerecord = (grdApplets.ActiveRecord as DataRecord); 
 
if (grdApplets.ActiveRecord != null)
{

Int64 id;
//edit code
 

}

}