easyui datagrid scrollto

Solutions on MaxInterview for easyui datagrid scrollto by the best coders in the world

showing results for - "easyui datagrid scrollto"
Federico
15 Apr 2018
1// since 1.3.3
2var dg = $('#dg');
3var indexToFetch = 88;
4
5// scroll to index (without pagination)
6dg.datagrid('scrollTo', indexToFetch);
7
8// scroll to index (using pagination)
9var pager = dg.datagrid('getPager');
10const pageSize = pager.pagination('options').pageSize;
11const pageIndex = Math.ceil( indexToFetch / pageSize );
12pager.pagination('select', pageIndex);
13dg.datagrid('scrollTo', indexToFetch % (pageSize + 1));
similar questions
datagrid in domo