EasyUI Forum
September 14, 2025, 02:25:56 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: Error Reloading Tree Grid  (Read 20784 times)
arma
Full Member
***
Posts: 110


View Profile
« on: October 28, 2013, 10:01:38 PM »

Hi,

Is this a bug or i'm doing wrong in reloading tree grid? I need to relod tree grid based on username parameter. No paging.

mygrid.treegrid('reload', {username: 'myusername'});

it works for mygrid.treegrid('reload'); without additional param

It says :

Code:
Uncaught TypeError: Cannot read property 'children' of null jquery.easyui.min.js:9690
(anonymous function) jquery.easyui.min.js:9690
x.extend.each jquery.min.js:4
x.fn.x.each jquery.min.js:4
$.fn.treegrid.methods.reload jquery.easyui.min.js:9687
$.fn.treegrid
« Last Edit: October 28, 2013, 10:04:53 PM by arma » Logged
arma
Full Member
***
Posts: 110


View Profile
« Reply #1 on: October 28, 2013, 10:11:14 PM »

After reading this post, it can be applied to treegrid as well, using queryParams. It's solved.

http://www.jeasyui.com/forum/index.php?topic=2343.msg5239#msg5239

i'm still curious why it caused error. The doc says :

Reload treegrid data. If the 'id' parameter is passed, reload the specified tree row, otherwise reload all tree rows.
Code example:

$('#tt').treegrid('reload', 2);   // reload the row which value is equals to 2
$('#tt').treegrid('reload');   // reload the all rows
$('#tt').treegrid('reload', {id:2, q:'abc'});  // reload the specified row with 'q' parameter passing to server
Logged
catpaw
Jr. Member
**
Posts: 85


View Profile Email
« Reply #2 on: January 21, 2014, 05:58:37 PM »

I have same problem

did you resolve?
Logged
arma
Full Member
***
Posts: 110


View Profile
« Reply #3 on: February 02, 2014, 12:44:51 AM »

Yes it's resolved as i said in previous reply. It was solved using queryParams:{
    param1:'value1',
    param2:'value2'
  },
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!