EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Opan Mustopah on March 13, 2015, 07:39:03 PM



Title: selectRecord not working on scrollview extension
Post by: Opan Mustopah on March 13, 2015, 07:39:03 PM
morning all.

i have a datagrid using scrollview extension and i want to use 'selectRecord' method.

my datagrid have 1000 record. just said idField is like that. pageSize =10

now i'm in first page, but i want to select record with id =800. when i try to using that method, it doesn't works.

can anyone help me to make scrollview extension achieve this method?

many thanks for the answer.


Title: Re: selectRecord not working on scrollview extension
Post by: stworthy on March 14, 2015, 06:09:26 PM
You must confirm if the record displaying on the current page before calling selectRecord method. Try calling 'scrollTo' or 'gotoPage' methods to make your record loaded on the page, then call 'selectRecord' method to select your record.
Code:
var dg = $('#tt');
dg.datagrid('scrollTo', ...);
setTimeout(function(){
dg.datagrid('selectRecord', ...);
},0)


Title: Re: selectRecord not working on scrollview extension
Post by: Opan Mustopah on March 14, 2015, 07:43:08 PM
thanks stworthy for your replay.
but how i know in what page that record i want to select is?