listbox mvvm - scroll into custom row

asked 2019-12-31 18:33:50 +0800

wastemails gravatar image wastemails

In pure mvvm, how to scroll to custom row number

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted

answered 2020-03-25 18:45:47 +0800

natelik gravatar image natelik

I am utilizing the MVVM design, I have a view which makes another ViewModel, after the client clicks spare, this view is shut and a seperate see is opened which shows an assortment of view models in a ListView. This ListView is arranged in sequential order request, so the new ViewModel may show up at the base of the ListBox, which isn't quickly obvious to the client. My inquiry is how would I get the view to auto look to the recently included thing? I surmise that It will utilize appended practices, and the ScrollIntoView occasion on the ListView, anyway its which occasion that I have to catch from the GridView that I am uncertain of..

link publish delete remove flag flag offensive (1) edit

answered 2020-03-26 10:51:21 +0800

hawk gravatar image hawk
2620 1 5
http://hawkphoenix.blogsp... ZK Team

updated 2020-03-26 11:01:43 +0800

Currently, there is no MVVM way to scroll a listitem into a view. please call the method: https://www.zkoss.org/javadoc/latest/zk/org/zkoss/zul/Listbox.html#scrollToIndex-int-

If you want to keep your ViewModel clean without referencing a component, you can apply a composer to the listbox to handle such a scrolling logic separately.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2019-12-31 18:33:50 +0800

Seen: 12 times

Last updated: Mar 26

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More