You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works if it's called after the list is populated. It fails if you populate the list and call EnsureVisible in the same call because the listview (and the datagridview) are designed using a remote cached data source that queries the server using a virtual paging system.
it's logged as WJ-7786, WJ-7787, and WJ-7788 becasue the same issue is present with the datagridview when setting the focus cell and/or scrolling before the data source is connected.
That's your case, you are populating and scrolling at the same time, when the scroll call reaches the listview it's not populated yet since the query for the data happens later asynchronously. We have added a deferred call now for this scenario, it seems to work but not always perfectly. Async stuff is a pain.
The deferred call is handled internally. There is nothing different you need to do. It's working fine with the detail view and the datagridview, but it still has problems with the item view probably because of the virtual rendering. You could try to add a timer and scroll on the first tick.
Activity
itg-assistant commentedon Jun 12, 2026
Luca answered 2016-11-14 16:35:12 UTC
Hi Gunter,
It works if it's called after the list is populated. It fails if you populate the list and call EnsureVisible in the same call because the listview (and the datagridview) are designed using a remote cached data source that queries the server using a virtual paging system.
it's logged as WJ-7786, WJ-7787, and WJ-7788 becasue the same issue is present with the datagridview when setting the focus cell and/or scrolling before the data source is connected.
Thanks,
Luca
itg-assistant commentedon Jun 12, 2026
Gunter answered 2016-11-14 20:43:50 UTC
Hi Luca
what does "in the same call" mean.
I have a listview which I populate in Form_Start event, one Item is selected by code and I want to ensure that user can see this item.
Can I split in this case the poulating and scroll into view in this case?
itg-assistant commentedon Jun 12, 2026
Luca answered 2016-11-14 21:36:52 UTC
That's your case, you are populating and scrolling at the same time, when the scroll call reaches the listview it's not populated yet since the query for the data happens later asynchronously. We have added a deferred call now for this scenario, it seems to work but not always perfectly. Async stuff is a pain.
Try the next build, it should be better at this.
/Luca
itg-assistant commentedon Jun 12, 2026
Gunter answered 2016-11-16 14:43:06 UTC
Hi Luca
The deferred call no, that you mentuion, how does it work?
itg-assistant commentedon Jun 12, 2026
Luca answered 2016-11-16 19:03:54 UTC
The deferred call is handled internally. There is nothing different you need to do. It's working fine with the detail view and the datagridview, but it still has problems with the item view probably because of the virtual rendering. You could try to add a timer and scroll on the first tick.