0

MVVM Grid Scroll Problem

asked 2015-10-05 15:08:12 +0800

ghostomg gravatar image ghostomg flag of Indonesia
15 3

updated 2015-10-05 15:22:15 +0800

Hi guys,

I have table entity class which is have association map one-to-many with another entity (Person & email account). I used it as model to view model class, Person as header (one). Email account as detail (many) and using Grid as their component (Grid model is vm.person.emailAccountList).

It work fine, but I just realized that every time it manipulated (add/delete) the grid row, the Grid's scroll always moving to top. Is that possible to manipulate this scroll view programmatically? or any others workaround? I've tried this, but seem does not work:

Clients.evalJavaScript("zk.Widget.$('$gridtest').ebody.scrollTop = zk.Widget.$('$gridtest').ebody.scrollHeight");

Program programmaticlly, I'm using this to notify changes for each add/delete row method:

binder.notifyChange(person, "emailAccountList");

Please kindly help. Thank you

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-10-05 15:31:23 +0800

Darksu gravatar image Darksu
1991 1 4

Hello ghostomg,

You could set the mold to paging with a fixed page size, thus you will not have this issue and it is also better for performance.

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2015-10-06 03:43:19 +0800

ghostomg gravatar image ghostomg flag of Indonesia
15 3

updated 2015-10-06 04:47:10 +0800

Hi Darksu Thanks a lot, your suggestion is work :) actually I'm not using paging feature within my grid, but since it solved this problem, I managed it with using paging=500 (assumed detail items per header max is 500), so it still look like normal :D

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

Follow
1 follower

RSS

Stats

Asked: 2015-10-05 15:08:12 +0800

Seen: 28 times

Last updated: Oct 06 '15

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