Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5990105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:11:46+00:00 2026-05-22T23:11:46+00:00

I am facing an issue in jqgrid’s treegrid. For local data the tool barserch

  • 0

I am facing an issue in jqgrid’s treegrid. For local data the tool barserch is not working and if add change the treegrid as false in colModel its works fine in the sense it is acting as a ordinary grid. i have pasted my code below for your reference

$(document).ready (function () {
    var mydata = [
        { id:"AA", name:"012356",   num:"07/15/2009", debit:"121212",credit:"Adam Opel GmbH", balance:"LAMBDA SENSOR", enbl:"Bosch",
          level:"0", parent:"",  isLeaf:false, expanded:false },
        { id:"AB", name:"001", num:"07/15/2009",   debit:"121212",credit:"Adam Opel GmbH", balance:"LAMBDA SENSOR", enbl:"Bosch",
          level:"1", parent:"AA", isLeaf:false, expanded:false },
        { id:"AC", name:"124", num:"07/15/2009",debit:"121212",credit:"Adam Opel GmbH", balance:"LAMBDA SENSOR", enbl:"Bosch",
          level:"2", parent:"AB", isLeaf:true,  expanded:false },
        { id:"AD", name:"002", num:"07/11/2009",debit:"121212",credit:"Adam Opel GmbH", balance:"LAMBDA SENSOR", enbl:"Bosch",
          level:"1", parent:"AA", isLeaf:true,  expanded:false },
        { id:"AE", name:"012456", num:"01/13/2009",debit:"454545 ",credit:"General Motors LLC", balance:"LINKAGE, WIPER", enbl:"Bosch",
          level:"0", parent:"",  isLeaf:false, expanded:true },
        { id:"AF", name:"000", num:"04/1/2011",debit:"454545",credit:"General Motors LLC", balance:"LINKAGE, WIPER", enbl:"Bosch",
          level:"1", parent:"AE", isLeaf:true,  expanded:false },
        { id:"AG", name:"001", num:"08/15/2009",debit:"454545",credit:"General Motors LLC", balance:"LINKAGE, WIPER", enbl:"Bosch",
          level:"1", parent:"AE", isLeaf:true,  expanded:false },
        { id:"AI", name:"0X2345", num:"07/15/2010",debit:"2424",credit:"GM Manufacturing Poland", balance:"MOTOR-REAR WIPER", enbl:"Bosch",
          level:"0", parent:"",  isLeaf:true,  expanded:false }
        ],
        grid = $("#treegrid");

    grid.jqGrid({
        datatype: "local",
        data: mydata, // will not used at the loading,
                      // but during expanding/collapsing the nodes
        colNames:["id","Contract#","Eff Date","Part#","Legal Entity","Part Description","Buyer Name"],
        colModel:[
            {name:'id', index:'id', width:1, hidden:true, key:true},
            {name:'name', index:'name', width:180},
            {name:'num', index:'acc_num', width:80, align:"center"},
            {name:'debit', index:'debit', width:80, align:"right"},
            {name:'credit', index:'credit', width:80,align:"right"},
            {name:'balance', index:'balance', width:80,align:"right"},
            {name:'enbl', index:'enbl', width: 60, align:'center'}
        ],
        height:'100%',
        rowNum: 1000,
        //pager : "#ptreegrid",
       // rowList : [5,10,20],
        sortname: 'id',
        viewrecords: true,
        treeGrid: true,
        treeGridModel: 'adjacency',
        treedatatype: "local",
        ExpandColumn: 'name',
        //altRows:true,
        //altclass:'myAltRowClass',
        caption: "Search Screen Output",
        loadComplete : function(){
            $("#treegrid").setGridWidth(1085,true);
            $("#treegrid").setGridHeight(470,true);
        },
        gridComplete: function ()
        {
            $(".treeclick","#treegrid").each(function() {
                    if($(this).hasClass("tree-plus"))
                    $(this).trigger("click");

            });
        }

    });
    // we have to use addJSONData to load the data
    grid[0].addJSONData({
        total: 1,
        page: 1,
        records: mydata.length,
        rows: mydata
    });

    grid.jqGrid('filterToolbar', {stringResult: true, searchOnEnter: false, defaultSearch : "cn"});

});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:11:47+00:00Added an answer on May 22, 2026 at 11:11 pm

    There are probably a misunderstanding with my previous answer on the trirand forum. Tree Grid feature of jqGrid work almost only with remote data received from the server per ajax. With respect of some tricks which you use it is do possible to display the local data in the tree grid. Nevertheless you still has very restricted features. For example the local data filtering will not works.

    In my answer on your question I supposed that you will use server side data filtering and the server will gives back the subset of tree nodes which corresponds the filter criteria. I’am sorry for the misunderstanding.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing issue while loaidng the data in JQGrid at a later stage
I'm working on a project which uses user authentication. I'm facing a issue with
Im facing an issue which I believe to be VAO-dependant, but Im not sure..
I am facing strange issue. I have wep-part that reads data from user's profile.
I am facing an issue with stat() . stat() does not seem to be
I am working with facebook-ios-sdk, It working fine But I am facing issue related
I'm facing one issue while writing Office Outlook 2007 Add-In, I'm accessing the email
I am facing issue while drawing semitransparent object with RenderToSurface(While it working file when
I’m currently facing an issue that my Oracle knowledge cannot solve, I’m definitely not
I am facing strange issue on Windows CE: Running 3 EXEs 1)First exe doing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.