EasyUI Forum
September 16, 2025, 03:27:27 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: treegrid expandTo  (Read 11187 times)
crosemffet
Jr. Member
**
Posts: 68



View Profile WWW Email
« on: April 06, 2013, 04:44:13 AM »

I'm trying to make a function to expand my treegrid to specific node, based on the result of the post.
sometimes works, and sometimes not..
what's wrong...?
function getLastState(){
   $.post('jq-ajaxJson.php?action=getLastState', function(data) {
      $('#tg').treegrid('expandTo', data);
      $('#tg').treegrid('expand', data);
   });
}
thanks in advance.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: April 08, 2013, 07:02:03 PM »

When calling 'expandTo' method, the node id value should be passed to expand and scroll to that node. If the specified node is not exists, the expanding action will fail. Be sure to confirm if the 'data' returned from your 'jq-ajaxJson.php' is correct.
Logged
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!