ListView EnsureVisible

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

Hi

how can I scroll an Item of a ListView into the visible area by code, I tried EnsureVisible, but It seems to have no effect

  • You must to post comments
0
0

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.

  • You must to post comments
0
0

Hi Luca

The deferred call no, that you mentuion, how does it work?

  • You must to post comments
0
0

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

  • You must to post comments
0
0

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?

  • You must to post comments
0
0

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

  • You must to post comments
Showing 5 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json