Wednesday, February 13, 2013

How to Scroll to Selected Datagrid Item

If you programmatically select an item on a WPF datagrid, you may need to scroll to make sure that item is visible. One line of code will take care of that for you.

myGrid.ScrollIntoView(myGrid.SelectedItem);

That should do it.

Happy Coding!

No comments:

Post a Comment