I’m trying to implement Ctrl-End to work while a row is being edited. For a test case, I have a table of 244 rows, of which 23 fit in the window at a given time, and trying it from the first row.
If I do CurrentItem = Items, that works to move to the last one in the window as expected.
CurrentItem = Items also works, scrolling the window down one row to bring the new one into view.
CurrentItem = Items just disappears the current item without scrolling anything, as does the desired CurrentItem = Items[Items.Count – 1]. I assume virtualization is coming into play here, since GetContainerFromItem on these items returns null.
I assumed BringItemIntoView(Items[Items.Count – 1]) was the fix for this, but whether I do it before or after the assignment to CurrentItem, there’s no effect; the window still stays displaying the first 23 items, and the current item disappears.
Oddly, if I _only_ BringItemIntoView(Items[Items.Count – 1]) and _don’t_ assign CurrentItem at all, it does scroll the window down to the last item – but of course, the last item is then not made current.
What am I doing wrong?
Imported from legacy forums. Posted by Russell (had 2779 views)