EasyUI Forum
September 16, 2025, 11:08:47 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 remote load of node data not including queryParams  (Read 10568 times)
tomhj
Newbie
*
Posts: 40


View Profile
« on: May 30, 2013, 01:01:24 AM »

I have a treegrid defined as:

        $('#${tableId}').treegrid({
            url: 'LoadData',
            title:    'My Treegrid',
            queryParams: {parm1: 1, parm2: 'Test'},
            idField: 'id',
            treeField: 'node',
            columns: [[{field: 'id', hidden: true},{field: 'node', title: 'Nodes'},{field: 'data', title: 'Some data'}]]
        });

The initial request for LoadData includes parm1 and parm2.   Data returned includes a node with state=closed and no children.  So when I click on that node in treegrid, LoadData is requested again, but this time the only parameter passed is id - it seems like queryParams are not being included.

Looking through the jquery.treegrid.js source, I see this in the expand() method:

                        request(target, row[opts.idField], {id:row[opts.idField]}, true, function(){
            if (cc.is(':empty')){
               subtree.remove();
            } else {
               _expand(cc);
            }
//            _expand(cc);
         });

Shouldn't it include the queryParams?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 30, 2013, 01:45:27 AM »

Try to download the updated treegrid plugin from http://www.jeasyui.com/easyui/plugins/jquery.treegrid.js.
Logged
tomhj
Newbie
*
Posts: 40


View Profile
« Reply #2 on: May 30, 2013, 09:42:02 AM »

Works great - thanks!
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!