Zamboni
Zamboni

Reputation: 8043

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>

Upvotes: 3

Views: 3126

Answers (1)

Fleg
Fleg

Reputation: 436

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

KeyboardNavigation.TabNavigation="None"

Upvotes: 13

Related Questions