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

  • Home
  • SEARCH
  • 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 6242707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:00:23+00:00 2026-05-24T12:00:23+00:00

I followed jqgrid demos (integrated Search toolbar) but I cannot make it work like

  • 0

I followed jqgrid demos (integrated Search toolbar) but I cannot make it work like it works in the demo, In the demo as soon as the user enters a character it triggers search but in my case I need to press enter and then it searches, where am i going wrong?

Here is my code

$('#compareContent').empty();
        $('<div id="compareParentDiv">'+
          '<table id="list2" cellspacing="0" cellpadding="0"></table>'+
                '<div id="gridpager3"></div></div>')
        .appendTo('#compareContent');

        $("#compareParentDiv").hide();

        var gridDiff = $("#list2");
        gridDiff.jqGrid({
            datastr: compareData,
            datatype: "jsonstring",
            colNames: ['KeyName', 'SubCategory', starheader, header1,'isEqual'],
            colModel: [
                { name: 'elementName', index: 'elementName', width: 150 },
                { name: 'subCategory', index: 'subCategory', width: 1 },
                { name: 'firstValue', index: 'firstValue', width: 300, jsonmap:'attribute.0.firstValue' },
                { name: 'secondValue', index: 'secondValue', width: 300,jsonmap:'attribute.0.secondValue' },
                { name: 'isEqual', index: 'isEqual', width: 1,hidden:true}
            ],

            pager: '#gridpager3',
            rowNum:50,
            scrollOffset:1,
            //viewrecords: true,

            //rownumbers: true,
            height: 320,
            autowidth:true,
            grouping: true,
            jsonReader: {
                repeatitems: false,
                page: function(){return 1;},
                root: "response"
            },

            groupingView: {
                groupField: ['subCategory'],
                groupOrder: ['desc'],
                //groupDataSorted : true,
                groupColumnShow: [false],
                //groupCollapse: true,
                //groupText: ['<b>{0} - {1} Item(s)</b>']
                groupText: ['<b>{0}</b>']
            },

            loadComplete: function() {
                if (this.p.datatype !== 'local') {
                    setTimeout(function () {
                       gridDiff.trigger('reloadGrid');
                   }, 0);
                } else {
                    $("#compareParentDiv").show();
                }

                var i, names=this.p.groupingView.sortnames[0], l = names.length;
                for (i=0;i<l;i++) {
                    if ($.inArray(names[i],grouping) >= 0) {
                        $(this).jqGrid('groupingToggle',this.id+"ghead_"+i);
                    } else {
                        // hide the grouping row
                        $('#'+this.id+"ghead_"+i).hide();
                    }
                }

                var i, l, data = this.p.data, rows = this.rows, item;
                l = data.length;
                for (i=0;i<l;i++) {
                    item = data[i];
                    if (!item.isEqual) {
                        $(rows.namedItem(item._id_))
                            .css({
                                "background-color": "#FFE3EA",
                                "background-image": "none"
                            });
                    }
                }
            }
        });
        gridDiff.jqGrid('navGrid', '#gridpager3', { add: false, edit: false, del: false, search: false, refresh: false });
        gridDiff.jqGrid('navButtonAdd',"#gridpager3",{caption:"Toggle",title:"Toggle Search Toolbar", buttonicon :'ui-icon-pin-s',
            onClickButton:function(){
                gridDiff[0].toggleToolbar();
            } 
        });
        gridDiff.jqGrid('navButtonAdd',"#gridpager3",{caption:"Clear",title:"Clear Search",buttonicon :'ui-icon-refresh',
            onClickButton:function(){
                gridDiff[0].clearToolbar();
            } 
        });
        gridDiff.jqGrid('filterToolbar');

Here is my json

{
"response": [
{
  "id": "1",
  "elementName": "bitmode",
  "category": "Product",
  "subCategory": "Product",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "bitmode",
      "firstValue": "file: cannot open /home/asimon/java/AIXJAVA/java/bin/libssaiok.so\u000a",
      "secondValue": "file: cannot open /home/asimon/java/AIXJAVA/java/bin/libssaiok.so\u000a"
    }
  ]
},
{
  "id": "2",
  "elementName": "connectionserver",
  "category": "Product",
  "subCategory": "IIRServers",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "connectionserver",
      "firstValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a",
      "secondValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a"
    }
  ]
},
{
  "id": "3",
  "elementName": "consoleserver",
  "category": "Product",
  "subCategory": "IIRServers",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "consoleserver",
      "firstValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a",
      "secondValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a"
    }
  ]
},
{
  "id": "4",
  "elementName": "cpuspeed",
  "category": "System",
  "subCategory": "System",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "cpuspeed",
      "firstValue": " 4204 \u000a",
      "secondValue": " 4204 \u000a"
    }
  ]
},
{
  "id": "5",
  "elementName": "hostname",
  "category": "System",
  "subCategory": "System",
  "isEqual": false,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "hostname",
      "firstValue": "gcslpar2\u000a",
      "secondValue": "gcslpar1\u000a"
    }
  ]
},
{
  "id": "6",
  "elementName": "httpsearchserver",
  "category": "Product",
  "subCategory": "IIRServers",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "httpsearchserver",
      "firstValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a",
      "secondValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a"
    }
  ]
},
{
  "id": "7",
  "elementName": "licenseserver",
  "category": "Product",
  "subCategory": "IIRServers",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "licenseserver",
      "firstValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a",
      "secondValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a"
    }
  ]
},
{
  "id": "8",
  "elementName": "machine",
  "category": "System",
  "subCategory": "System",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "machine",
      "firstValue": "000CE082D900\u000a",
      "secondValue": "000CE082D900\u000a"
    }
  ]
},
{
  "id": "9",
  "elementName": "maxfilesperproc",
  "category": "System",
  "subCategory": "Kernel Parameters",
  "isEqual": false,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "maxfilesperproc",
      "firstValue": " 2000\u000a",
      "secondValue": " 8192\u000a"
    }
  ]
},
{
  "id": "10",
  "elementName": "maxthreadsperproc",
  "category": "System",
  "subCategory": "Kernel Parameters",
  "isEqual": false,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "maxthreadsperproc"
    }
  ]
},
{
  "id": "11",
  "elementName": "mempagesize",
  "category": "System",
  "subCategory": "Kernel Parameters",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "mempagesize",
      "firstValue": "4096\u000a",
      "secondValue": "4096\u000a"
    }
  ]
},
{
  "id": "12",
  "elementName": "numberofcpu",
  "category": "System",
  "subCategory": "System",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "numberofcpu",
      "firstValue": " 2\u000a",
      "secondValue": " 2\u000a"
    }
  ]
},
{
  "id": "13",
  "elementName": "osname",
  "category": "System",
  "subCategory": "System",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "osname",
      "firstValue": "AIX\u000a",
      "secondValue": "AIX\u000a"
    }
  ]
},
{
  "id": "14",
  "elementName": "release",
  "category": "System",
  "subCategory": "System",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "release",
      "firstValue": "1\u000a",
      "secondValue": "1\u000a"
    }
  ]
},
{
  "id": "15",
  "elementName": "rulebaseserver",
  "category": "Product",
  "subCategory": "IIRServers",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "rulebaseserver",
      "firstValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a",
      "secondValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a"
    }
  ]
},
{
  "id": "16",
  "elementName": "ssaname3server",
  "category": "Product",
  "subCategory": "IIRServers",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "ssaname3server",
      "firstValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a",
      "secondValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a"
    }
  ]
},
{
  "id": "17",
  "elementName": "ssaname3webserviceserver",
  "category": "Product",
  "subCategory": "IIRServers",
  "isEqual": false,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "ssaname3webserviceserver",
      "firstValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a",
      "secondValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a"
    }
  ]
},
{
  "id": "18",
  "elementName": "version",
  "category": "System",
  "subCategory": "System",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "version",
      "firstValue": "6\u000a",
      "secondValue": "6\u000a"
    }
  ]
},
{
  "id": "19",
  "elementName": "xmlconsoleserver",
  "category": "Product",
  "subCategory": "IIRServers",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "xmlconsoleserver",
      "firstValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a",
      "secondValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a"
    }
  ]
},
{
  "id": "20",
  "elementName": "xmlsearchserver",
  "category": "Product",
  "subCategory": "IIRServers",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "xmlsearchserver",
      "firstValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a",
      "secondValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a"
    }
  ]
},
{
  "id": "21",
  "elementName": "xmlsyncserver",
  "category": "Product",
  "subCategory": "IIRServers",
  "isEqual": true,
  "isPrasentinXml1": true,
  "isPrasentinXml2": true,
  "isPrasentinXml3": false,
  "attribute": [
    {
      "name": "xmlsyncserver",
      "firstValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a",
      "secondValue": "/usr/bin/sh: null/ssasvck:  not found.\u000a"
    }
  ]
}
],
"xls_path": "\\csm\\files\\comparefiles\\compare_output.xls"
}
  • 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-24T12:00:24+00:00Added an answer on May 24, 2026 at 12:00 pm

    If I understand you correct you should just use searchOnEnter: false option of the searching toolbar. Some other options could be also helpful. I use typically

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

    and add additionally ignoreCase: true option to the grid. By the way you can combine the searching toolbar with advanced searching dialog which allows to construct more complex queries (see the answer).

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

Sidebar

Related Questions

I followed demo instructions on page http://www.achartengine.org/content/goodies.html i successfully imported the demo project, but
I followed the specifications founded in jqgrid documentation but an error is occurring when
Followed the simple tutorial from here Settings of Bespin embedded? But cannot figure a
I followed the solution to the items rearranging problem provided by dnr3. Works like
Followed this question about delayed_job and monit Its working on my development machine. But
I followed the instructions on source.android.com to build the Android framework, but when I
I followed this tutorial . But whenever I try to log in with my
I followed this link to gzip my php driven website It's working fine but
Followed this tutorial on getting autocomplete for CI to work with Eclipse http://taggedzi.com/articles/display/autocomplete-eclipse-codeigniter-2 -
I followed this tutorial but still I go to the webpage refresh, then go

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.