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 3988700
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:17:01+00:00 2026-05-20T06:17:01+00:00

Scenario: Use stype:’select’ for ‘Client’ column in search popup. The dataUrl for this column

  • 0

Scenario:
Use “stype:’select'” for ‘Client’ column in search popup.

The dataUrl for this column returns "<select><option value='F'>F</option><option value='O'>O</option></select>"

Bring up the Search Popup.

First line of the search criteria: ‘Client not equal F’

Second line of search criteria: ‘Amount not equal 300′

match type: ‘any’

Click on Find.

I expect both the records with client type == ‘F’ to show up but neither do. Looks like the match type is still ‘AND’ instead of ‘OR’.

$(function() {
    var mydata = [              
            {id:"1", name:"test",       amount:"200"},
            {id:"2", name:"test2",      amount:"300"},
            {id:"3", name:"F",          amount:"400"},
            {id:"4", name:"test4",      amount:"200"},
            {id:"5", name:"test5",      amount:"300"},
            {id:"6", name:"test6",      amount:"400"},
            {id:"7", name:"test7",      amount:"200"},
            {id:"8", name:"test8",      amount:"300"},
            {id:"9", name:"test9",      amount:"400"},
            {id:"10",name:"test10",     amount:"500"},
            {id:"11",name:"F",          amount:"500"},
            {id:"12",name:"test11",     amount:"500"},
            {id:"13", name:"test",      amount:"200"},
            {id:"14", name:"O",         amount:"200"}
    ];
    jQuery("#list").jqGrid({            
        datatype: "local",
        data: mydata,
        width: 700,
        colNames:['Inv No','Client', 'Amount'],
        colModel:[
            {name:'id',index:'id', width:65, sorttype:'int', searchoptions:{sopt:['eq','ne','lt','le','gt','ge']}},
            {name:'name',index:'name', width:100, searchoptions:{dataUrl:'/api/domains/producttypedomain'}},
            {name:'amount',index:'amount', sorttype:'int', width:80, align:"right"}
        ],
        rowNum:100, 
        pager: '#pager',            
        height:'auto',
        viewrecords: true,
        rownumbers: true,
        gridview : true,            
        caption:"Advanced Search Example"
    });
    jQuery("#list").jqGrid('navGrid','#pager',
    {
        edit:false,add:false,del:false,search:true,refresh:true
    },
    {}, // edit options
    {}, // add options
    {}, //del options
    {multipleSearch:true, overlay:false,  recreateFilter:true} // search options
    );
});
  • 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-20T06:17:01+00:00Added an answer on May 20, 2026 at 6:17 am

    I verified your example and I see that you found a bug in jqGrid. So +1 from me for you.

    By the way the same bug still exist in the new version of the new multisearch plugin which is now in the alpha phase (see here for more information). The bug can be reproduced if one try to make OR (any) operation of two “not equal” operation. The “not equal” implementation has a bug.

    In the current version (with the bug) of jqGrid the searching/filtering follows to execution of the statements like

    !(parseInt(this.amount,10) == parseInt(200,10)) && !(parseInt(this.amount,10) == parseInt(500,10))
    

    in case of operation ((amount<>200)||(amount<>500)). It is wrong. The “not equal” implementation is buggy in the current version of jqGrid.

    I fixed the problem in the source code of jqGrid as following:

    1) I added new function notEquals defined as

    this.notEquals=function(f,v,t){
        return self._compareValues(self.equals,f,v,"!==",t);
    };
    

    and inserted it after the this.equals (see here).

    2) I modified the line 1359 of the grid.base.js from

    'ne':function(queryObj) {return queryObj.not().equals;},
    

    to

    'ne':function(queryObj) {return queryObj.notEquals;},
    

    After the fixes the searching works correct. You can see the results here (your original version one can test here)

    In the next time I will post my suggestion in the trirand forum and I hope that Tony Tomov (the developer of jqGrid) will implement the fixes in the jqGrid.

    UPDATED: How I promised I posted the bug report together with my suggestions to fix the problem.

    UPDATED 2: The bug is already fixed in the current developer version on the GitHub. You can see the results here which use new fixed version with even more changes as I suggested in my answer. The new multiselect interface you can see here.

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

Sidebar

Related Questions

I am trying to use JQuery in my ASP.Net 2.0 website in this scenario:
Is it possible to use BackGroundWorker thread in ASP.NET 2.0 for the following scenario,
Tackling a strange scenario here. We use a proprietary workstation management application which uses
How should I use the unit of work pattern in the following scenario: I'm
I am going to use SSRS to generate report for my website. Scenario: I
This question is about best use scenarios in projects with ORMs like NHibernate, Subsonic,
Scenario: A stored procedure receives from code a DateTime with, let's say DateTime.Now value,
Scenarion: I am having a web application which is going to use SqlServerReport(SSRS) sitting
In what scenarios is it better to use a struct vs a class in
Scenario: You have an ASP.Net webpage that should display the next image in a

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.