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
4970
How to get the row in xamgrid for rightclick for contextmenu?
posted

I have set contextmenu for xamgrid like:

<XamGrid     ItemsSource="{Binding MyList, Mode=TwoWay}">
<ig:ContextMenuService.Manager>
    <ig:ContextMenuManager ModifierKeys="None" OpenMode="RightClick" >
        <ig:ContextMenuManager.ContextMenu>
            <ig:XamContextMenu Opening="XamContextMenu_Opening">
                <ig:XamContextMenu.ItemTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <CheckBox Click="CheckBox_Click"  Tag="{Binding ID}" IsChecked="{Binding IsChecked, Mode=TwoWay}" />
                <TextBlock Text="{Binding MyName}" Margin="5,0,0,0"/>
            </StackPanel>
        </DataTemplate>
                </ig:XamContextMenu.ItemTemplate>
            </ig:XamContextMenu>
        </ig:ContextMenuManager.ContextMenu>
    </ig:ContextMenuManager>
</ig:ContextMenuService.Manager>
<ig:XamGrid.Columns>
.....
</ig:XamGrid.Columns>
</XamGrid>

there is a checkbox in side the contextmenu. then in Click event handler for this checkbox, I want to know the specific row of xamgrid when rightclick  hit on it. How can I do it in code for checkbox Click event handler?

right now, I need to click the row firstly, then rightclick on the row for contextmenu, then I get the row from selected row.  This is not user friendly. So I want to one right click for all.

 

 

Parents Reply Children
No Data