PDA

View Full Version : Cursor/Screen position is shifting while sorting on grid



AJAIN32
19 Mar 2015, 6:44 AM
Hi,

I have one view where i have some xtypes/Views, and i am populating some grids one after other.

In some of the grid when i perform sort, the screen is getting shifted to some other grid.
For example in a view i have -
Grid1
Grid 2
Grid 3
Grid 4
Grid 5

and these grids are placed in a container that is part of the main view so scroll bar is there if we are showing all the grids, Now if i sort any column on Grid5 it scrolls up automaically and i see Grid3 and to see Grid5 i need to scroll down then.

The issue i think is because of height, I am not giving any fix height to grids as the data is dynamic and when grid store is updated the layout is also updated. Any idea on that ?

Can anyone please suggest ?

Thanks,
Ankit

AJAIN32
20 Mar 2015, 11:59 AM
Hi,

I did some more research on the issue this may be because i have not given any height to the grid or to the container, which is having grid. when i provide height to any of them it works. and no floating happens after sorting.

can anyone please tell me -
what is the difference between - if i give height : 0 to grid or the container of grid and if i dont give any height at all. ?

also i found one property constrains which mentions that if it is set to true the grid wont float outside to its container, i tried that but it didn't worked for me. can anyone please suggest what is the correct way to use these property and doConstrain method ? Any example ?

Please suggest !!

Thanks,
Ankit

joel.watson
21 Mar 2015, 8:39 AM
Hi Ankit--

What is the "layout" setting for the container in which all these grids are housed?

Thanks
Joel

AJAIN32
21 Mar 2015, 5:32 PM
Hi, Thanks For Replying,

I have tried with layout:'fit' layout in that container which contains these grids. but it didn't work.

is there any special configuration or method available which can stop floating these elements?

Thanks,
Ankit

joel.watson
21 Mar 2015, 6:23 PM
Can you share your config? Or create a fiddle that demonstrates the issue? https://fiddle.sencha.com

Thanks
Joel

AJAIN32
21 Mar 2015, 8:50 PM
Hi,

I tried the same issue with fiddle but somehow not able to reproduce. can you please tell me that how this layouts work ?
The problem is occurring because i am not including any height to it. and when i am performing any sort on it the layout is refreshed or changed and the positioning of screen show some other grid and it is also happening with some grid not with all. I am not sure how to deal with it.

It would also be helpful if u can tell me that what happens when i include height : 0 and when i do not include it. Because we dont want to give grid or the parent container any height as it may lead to a scroll bar with that which i dont want to have. Any idea ?

Thanks,
Ankit

joel.watson
22 Mar 2015, 5:58 AM
Please share your config.

Thanks
Joel