Hi!
I have a (buffered) grid with lots of entries and I want to scroll to a unrendered record programmatically. I tried a lot of options to achieve this, but without success.
Among others, I tried the following method calls:
- grid.bufferedRenderer.scrollTo
- grid.ensureVisible
- grid.getView().focusRow
- grid.getView().scrollRowIntoView
The most promising approach are grid.bufferedRenderer.scrollTo and grid.ensureVisible.
But I get errors when calling these methods (errors are thrown in BufferedRenderer):
grid.ensureVisible(record/index) / grid.bufferedRenderer.scrollTo(record/index):
Code:
Uncaught TypeError: Cannot read property 'getHeight' of null
at constructor.getScrollHeight (BufferedRenderer.js?_dc=1558685337419:1990)
at constructor.refreshSize (BufferedRenderer.js?_dc=1558685337419:441)
at constructor.afterTableLayout (BufferedRenderer.js?_dc=1558685337419:384)
at constructor.finishedLayout (TableLayout.js?_dc=1558685337420:352)
at constructor.callLayout (Context.js?_dc=1558685337417:371)
at constructor.flushLayouts (Context.js?_dc=1558685337417:559)
at constructor.runComplete (Context.js?_dc=1558685337417:1236)
at constructor.callOverrideParent (Ext.js?_dc=1558685337417:59)
at constructor.callParent (Base.js?_dc=1558685337417:1470)
at constructor.runComplete (Component.js?_dc=1558685337417:223)
The error is the same for both calls. I tried the calls using several parameters (record, index, recordId).
Does anyone have an idea what the problem could be? I am using ExtJs 6.7.0