I am making a web-based logviewer using extjs.
I would like new log-lines to be added to the bottom of my gridview as it saves cpu by not requiring a sort to move it to the top of the grid (plus its how my coworkers prefer it).
My problem is that ideally the grid would scroll to the bottom after a new row is added.
I have been looking through the documentation and I cannot figure out how to do this. I just see a method to scroll to the top.
Any ideas?
Thanks!
I am making a web-based logviewer using extjs.
I would like new log-lines to be added to the bottom of my gridview as it saves cpu by not requiring a sort to move it to the top of the grid (plus its how my coworkers prefer it).
My problem is that ideally the grid would scroll to the bottom after a new row is added.
I have been looking through the documentation and I cannot figure out how to do this. I just see a method to scroll to the top.
Any ideas?
Thanks!
Share Improve this question asked Apr 13, 2010 at 21:38 PoulPoul 3,4765 gold badges41 silver badges44 bronze badges1 Answer
Reset to default 14Use GridView's focusRow
method, e.g.:
myGrid.getView().focusRow(20);
If you don't already have the row index you'll have to retrieve it using one of GridView's related methods for finding a row.