Set focus to datagrid from treeview
I'm attempting to set the focus to a datagrid after a selection has been made in a treeview. I'm capturing the correct value in the treeview, and making a decision based on that value, so things are working to that point. Now I simply want to set focus to a datagrid, any row, any column. In the past I've had to use a delegate, but I'm unclear if this is true in WPF. Seems simple, but so far the solution is elusive.
RonPosted Mar 13, 2012, 4:43 PM
VulpesPosted Mar 13, 2012, 4:23 PM
So, I'd try something like:
bool isSuccess = dataGrid1.Focus();
RonPosted Mar 13, 2012, 4:15 PM
VulpesPosted Mar 13, 2012, 4:02 PM
For that to work the Focusable property needs to be set to true which should be the case anyway.