Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent tab into WPF DataGrid

I would like to prevent tabbing into a read-only Microsoft data grid in WPF. I set IsTabStop to False, but I can still tab into the data grid. Any ideas?

<WpfToolkit:DataGrid
    IsReadOnly="True"
    IsTabStop="False"
    ItemsSource="{Binding Path=GridData, Mode=OneWay}" >
</WpfToolkit:DataGrid>
like image 899
Zamboni Avatar asked Mar 06 '26 19:03

Zamboni


1 Answers

It helps, if you add this line to your datagrid xaml:

KeyboardNavigation.TabNavigation="None"

like image 100
Fleg Avatar answered Mar 08 '26 19:03

Fleg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!