bufferedRenderer plugin has a function scrollTo(recordIdx)
.
There is no function in gridpanel
or gridview
or dataview
that calls bufferedRenderer.scrollTo
, so I guess you have to call getView().bufferedRenderer.scrollTo
directly from your grid.
Update: Please note that scrollTo
may not be called if the store is empty, as this causes an error in the framework. Reason is that scrollTo
takes the record index; if the index is below 0, it will be set to 0, if it is store.Count() or greater, it will be set to store.Count()-1 (which is -1 if the store is empty). Then, the record is fetched from the store (getAt(index)
), which returns null
if and only if the store is empty, and then it is checked that the record is indeed a model:
if(record.isModel)
which then causes the error
Uncaught TypeError: Cannot read property 'isModel' of null
So you have to always check that the store is not empty before calling scrollTo
:
if(view.store.getCount()) view.bufferedRenderer.scrollTo(index);