|Grid jumps to beginning (topIndex == 0) [message #1288289]
||Tue, 08 April 2014 08:39
| Joachim Butz
Registered: June 2011
I am having the following problem in a Grid in RAP.|
I am selecting a value from a CellEditor (dropDown).
After this selection my Grid always jumps back to the beginning (topIndex == 0).
I found out, that, when selecting a value from the CellEditor, TextSizeRecalculation.forceShellRecalculations(Shell) is triggered.
This calls TextSizeRecalculation.enlargeShell(Shell), which also increments the height of the grid by 1000 pixels.
As a result the grid thinks it is big enough to display its content and that's why the topIndex becomes 0 (see Grid.updateScrollBars()).
When I uncomment the following lines from TextSizeRecalculation.forceShellRecalculations(Shell), it works, i.e. the my Grid does not jump to the beginning.
// enlargeShell( shell );
// enlargeScrolledCompositeContent( shell );
I have two questions regarding this problem:
*) What is the purpose behind enlargeShell( shell ) and enlargeScrolledCompositeContent( shell ) ?
*) What possibilities do I have to workaround this problem?
- I have tried to buffer and restore the topIndex of the Grid (analogous to bufferScrolledCompositeOrigins and restoreScrolledCompositeOrigins), but this did not work.
Powered by FUDForum
. Page generated in 0.02691 seconds