We have a listgrid with >1000 entries and want to scroll to a row and select the row in the lsitgrid.
In the documentation there is the possibility to call scrollToRow(index) and selectSingleRecord(index).
Using this in the example of the documentation scolls to the row, but it doesn't select the object at this row.
This example http://www.smartclient.com/docs/10.0/a/system/reference/SmartClient_Explorer.html?skin=Enterprise#databoundFilter and afterwards you can paste this code to the console. After the second time you execute this snippet the row is correclty set.
Should this work, or is this constellation of scrollToRow and select a row a unsupported combination?
I saw that selectSingleRecord would like to have a record, but in a datasource this record is not always present and getting the record out of listgrid.data.find() doesn't work for datasources (because the data is not loaded).
What is the correct way, to scroll to an specific row and select this row while using a datasource in the listgrid?
In the documentation there is the possibility to call scrollToRow(index) and selectSingleRecord(index).
Using this in the example of the documentation scolls to the row, but it doesn't select the object at this row.
This example http://www.smartclient.com/docs/10.0/a/system/reference/SmartClient_Explorer.html?skin=Enterprise#databoundFilter and afterwards you can paste this code to the console. After the second time you execute this snippet the row is correclty set.
Code:
countryList.scrollToRow(60); countryList.selectSingleRecord(60);
I saw that selectSingleRecord would like to have a record, but in a datasource this record is not always present and getting the record out of listgrid.data.find() doesn't work for datasources (because the data is not loaded).
What is the correct way, to scroll to an specific row and select this row while using a datasource in the listgrid?
Comment