How do I use ScrollIntoView so the row I scroll to is top of the grid, now it's at bottom.
A workaround is to scroll to bottom first then ScrollIntoView but then then grid flickers/jumps and it don't look good.
1 Answer, 1 is accepted
answered on 08 Jan 2014, 03:47 PM
This method is used only for bringing the item into view. It cannot guarantee that the item you want to see will be displayed on top of the grid. For example if the item you want to bring into view is the last or second to last, it will be impossible.
There are two possible workarounds for this issue.
1. Scroll to bottom and after that call ScrollIntoView(), but as you noted there will be some flickering.
2. By knowing the row height and the index of the element you can calculate the vertical offset necessary for the positioning the item on top of the grid.
You can find more information about this in this forum: link
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely. Sign up for Free application insights >>