PDA

View Full Version : preventing page jumps



raj_plays
26 Sep 2013, 10:50 AM
Hi,
My page has a hierarchy of grid arranged one under the other.
Initially only the top level grid is shown.
When a row in the parent grid is clicked, its child table is created and shown with corresponding child rows.
This leads to the page jumping up and down which is irritating.
Is there a way to keep the page at a fixed at an X/Y coordinate?

Regards,
Raj

slemmon
30 Sep 2013, 2:28 PM
Hmm... not 100% sure I follow what's happening. Do you have an example script you could share that demonstrates the issue you're seeing?

raj_plays
1 Oct 2013, 9:43 AM
Thanks, slemmon.
I will explain it. There is a lot of code and most of it is irrelevant to this topic.
My page has 2 named divs, one below the other.


<div id="campaigns-grid" style="width: 700px; height: 400px; float: left"></div><div style="width: 850px; height: 20px; float: left">&nbsp;</div><div id="radiotext-form" style="width: 700px; height: 300px; float: left"></div>
The first div has a grid in it. On rowselect, i create and show a second grid in the second div.
This makes the page longer and the page scrolls down to the second grid automatically.
I need to stop this scrolling and keep the y position fixed.

slemmon
1 Oct 2013, 12:07 PM
While I don't know the app details / page setup why not have the grids managed in a container with vbox layout and add grids to that container as needed?

Here's an example showing how that can be done and when you add grids the scroll location is no affected:
https://fiddle.sencha.com/#fiddle/ob

*click on a row in the top grid to add more grids below

raj_plays
1 Oct 2013, 10:46 PM
Thanks, slemmon.
That's a good way to do it.