PDA

View Full Version : Scroll to bottom with BufferView



legrego
27 Apr 2012, 7:20 AM
I'm having difficulties getting the grid to scroll to the bottom when using the bufferview extension. Using selectLastRow(), or focusRow() will correctly perform the selection, but the view does not update to show the last row.

In firefox, I am able to manually get it there by using


var dom = transConfirmation.grid.getView().scroller.dom,
child = dom.childNodes[0];
dom.scrollTop = child.clientHeight - dom.clientHeight;


This does not work in IE7, however. I can see the view jump down, but it immediately resets to the top of the grid.

I also tried using the ensureVisible function on the GridView, but to no avail.

Any suggestions?

scottmartin
1 May 2012, 1:12 PM
Have a look at:



grid.getSelectionModel().selectRow(row);
grid.view.focusCell(row, 0, true);


Regards,
Scott.

legrego
2 May 2012, 6:11 AM
Hi Scott,

That worked perfectly. Thank you for your help!