Reputation:
I have created a WPF page with a GridView
. In that GridView
there are 5 TextBox
es available per row. When I enter the data on the first TextBox
in the first row and then press tab, the focus moves onto the next TextBox
. I enter the data on that TextBox
and press tab and so on....
Finally I enter the data on the last TextBox
on that row and press the enter key. The focus moves to elements outside the GridView
.
I want the focus to move onto the first TextBox
of the second row of the GridView
.
Upvotes: 3
Views: 867
Reputation: 1452
Try this on the text box you want to focus..
FocusManager.FocusedElement="{Binding RelativeSource={RelativeSource Self}}"
Upvotes: 8