Hi,
We want to implement simple routing - HLayout with left and right member (we call it just page). Left member (navigation menu) contains buttons, which when clicked will set the chosen right member (feature page).
Feature pages are supposed to be created only once - when user opens featurePage second time we show the feature page as he left it.
Some feature page contains listGrid with paging. We have opened this page and scrolled the grid to middle. Then we switch to other feature page and then back to original. It draws again the original feature page and the listGrid in it. But the listGrid is scrolled to the top showing no records. The grid's scrollbar is supposed to be set to the middle. I was trying to call ListGrid.markForRedraw() in the callback of page redraw, but this refreshes grid to the first data page - scrolled back to the row 1.
Do you have any suggestion how to make grid to be drawn properly on the right scroll position?
SmartClient Version: v10.0p_2017-11-10/PowerEdition Deployment (built 2017-11-10)
GC Version 64.0.3282.167 (Official Build) (64-bit)
We want to implement simple routing - HLayout with left and right member (we call it just page). Left member (navigation menu) contains buttons, which when clicked will set the chosen right member (feature page).
Feature pages are supposed to be created only once - when user opens featurePage second time we show the feature page as he left it.
Some feature page contains listGrid with paging. We have opened this page and scrolled the grid to middle. Then we switch to other feature page and then back to original. It draws again the original feature page and the listGrid in it. But the listGrid is scrolled to the top showing no records. The grid's scrollbar is supposed to be set to the middle. I was trying to call ListGrid.markForRedraw() in the callback of page redraw, but this refreshes grid to the first data page - scrolled back to the row 1.
Do you have any suggestion how to make grid to be drawn properly on the right scroll position?
Code:
private void showPage(FeaturePage featurePage) { Canvas page = cachedPages.get(featurePage); if (page == null) { switch (featurePage) { case page1: page = getPage1(); break; case page2: page = getPage2(); break; case page3: page = getPage3(); break; } cachedPages.put(featurePage, page); } if (activePage != page) { if (activePage != null) { removeMember(activePage); } addMember(page); activePage = page; } }
SmartClient Version: v10.0p_2017-11-10/PowerEdition Deployment (built 2017-11-10)
GC Version 64.0.3282.167 (Official Build) (64-bit)
Comment