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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:55:25+00:00 2026-05-22T20:55:25+00:00

This my jqGrid search toolbar script: <link rel=stylesheet type=text/css media=screen href=jqGrid/css/ui.jqgrid.css /> <link rel=stylesheet

  • 0

This my jqGrid search toolbar script:

<link rel="stylesheet" type="text/css" media="screen" href="jqGrid/css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="jqGrid/plugins/ui.multiselect.css" />
    <script src="jqGrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
    <script src="jqGrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
    <script src="jqGrid/js/jquery.jqGrid.src.js" type="text/javascript"></script>
    <script src="jqGrid/src/jquery.fmatter.js" type="text/javascript"></script>
    <script src="jqGrid/src/jqModal.js" type="text/javascript"></script>

jQuery("#list").jqGrid({
        url:'dounfinish.php',
        datatype: 'json',
        mtype: 'POST',
        colNames:['id','Date', 'Line'],
        colModel :[ 
                   {name:'def_id', index:'def_id', hidden:true, width:55}, 
                   {name:'Problem_date', index:'Problem_date', width:90, editable:true}, 
                   {name:'Line', index:'Line', width:80, align:'right',                   editable:true,search:true,stype:'text',searchoptions:{sopt:['cn']}}],
        pager: jQuery('#pager'),
        rowNum:10,
        rowList:[10,20,30],
        sortname: 'Problem_date',
        sortorder: "desc",
        viewrecords: true,
        imgpath: 'themes/basic/images',
        caption: 'OQC DEFECT DATA'
        });

jQuery("#list").jqGrid('navGrid','#pager',{edit:true,add:false,del:false,search:false});
jQuery("#list").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: true, groupOp:'AND'});

And in console:

_search:true
nd:1306513344121
rows:10
page:1
sidx:Problem_date
sord:desc
filters:{"groupOp":"AND","rules":[{"field":"Line","op":"cn","data":"7"}]}

how should I do to post the “data” value? so, I can search data use toolbar search.


grid

  • 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-22T20:55:26+00:00Added an answer on May 22, 2026 at 8:55 pm

    You should just use defaultSearch:'cn' option of the filterToolbar method:

    jQuery("#list").jqGrid('filterToolbar', {stringResult: true, defaultSearch:'cn'});
    

    (I removed additionally the options with the default values).

    If you use local grid data or the option loadonce:true another jqGrid parameter ignoreCase:true could be also interesting for you.

    UPDATED: If you want to use different searching operations for the different columns you should use correct colModel options: searchoptions instead of searchoption (‘s’ character at the end).

    UPDATED 2: How you can verify here if you type bla in the searching toolbar in the ‘Line’ column the request with the data

    _search=true&nd=1306489580463&rows=10&page=1&sidx=Problem_date&sord=desc&filters=%7B%22groupOp%22%3A%22AND%22%2C%22rules%22%3A%5B%7B%22field%22%3A%22Line%22%2C%22op%22%3A%22cn%22%2C%22data%22%3A%22bla%22%7D%5D%7D
    

    will be send to the server which will be decoded as

    _search=true&nd=1306489580463&rows=10&page=1&sidx=Problem_date&sord=desc&filters={"groupOp":"AND","rules":[{"field":"Line","op":"cn","data":"bla"}]}
    

    So the operation which will be used is “cn”.

    UPDATED 3: If you use datatype: 'json' without loadonce:true, the server is responsible for sorting, paging and filtering of the data. The jqGrid just send the corresponding information in the parameters (rows, page, sidx, sord, _search:true, filters). If you don’t can or don’t want to do all this on the server side you can just use loadonce:true and the client part (jqGrid yourself) will change datatype to ‘local’ after the first load and will do all what you need itself. It work very good if the size of you data small (about 100 rows). You can try this way.

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

Sidebar

Related Questions

I have a jqGrid that is using the toolbar search with some text searches
I have a form like this: <form id='myForm'> <input type='text' name='search' /> <input type='text'
I'm trying this source where jqGrid gets some json data from django: link Unfortunately
I am using jqGrid with a search toolbar. Now for several columns I do
I'm building tables using jqGrid with a filter toolbar to let users filter the
I have been struggling quite a bit to get this JQgrid to work with
I'm trying to get work this code: $(#list).jqGrid({ url: 'employers.php', datatype: 'json', mtype: 'POST',
I need help display data in the jqGrid footer row. This is my configuration
I'm using jqGrid in my pages, I modified the ui.jqgrid.css file to wrap the
I have a search form I generated using the filterGrid option in JqGrid. I

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.