Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SelectedItem for CellSelection #253

Open
Wowhere opened this issue Jan 31, 2024 · 0 comments
Open

Implement SelectedItem for CellSelection #253

Wowhere opened this issue Jan 31, 2024 · 0 comments

Comments

@Wowhere
Copy link

Wowhere commented Jan 31, 2024

Implement SelectedItem for CellSelection

I want to know how to implement SelectedItem property for CellSelection.

XAML below is working if i define HintsGridData.RowSelection.SelectedItem but i cant use SelectedItem for CellSelection. How to implement this?

<TreeDataGrid x:Name="resultGrid" Source="{Binding HintsGridData}" HorizontalAlignment="Stretch"
	   BorderThickness="2" BorderBrush="Gray" CanUserResizeColumns="True" >
	<TreeDataGrid.ContextMenu>
		<ContextMenu>
			<MenuItem Header="Copy" Command="" />
			<MenuItem Header="Execute" Command=""/>	
			<MenuItem Header="Open in browser"/>	
			<MenuItem Header="---"/>	
			<MenuItem Header="Delete" Command="{Binding DeleteHintCommand}" CommandParameter="{ReflectionBinding HintsGridData.RowSelection.SelectedItem}"  IsEnabled="{Binding IsGridEditable}"/>	
		</ContextMenu>
	</TreeDataGrid.ContextMenu>
</TreeDataGrid>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant