EasyUI Forum
September 14, 2025, 10:23:19 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: selectRecord not working on scrollview extension  (Read 7952 times)
Opan Mustopah
Full Member
***
Posts: 164


Indonesia


View Profile Email
« 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.
Logged

-- Bajak Otak --
*** Sorry for my bad english :3 ***
--JeasyUI version 1.4--
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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)
Logged
Opan Mustopah
Full Member
***
Posts: 164


Indonesia


View Profile Email
« Reply #2 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?
Logged

-- Bajak Otak --
*** Sorry for my bad english :3 ***
--JeasyUI version 1.4--
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!