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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:55:30+00:00 2026-06-06T03:55:30+00:00

The grid with the options below with the filtertoolbar works fine when you comment

  • 0

The grid with the options below with the filtertoolbar works fine when you comment out the ‘sopt’ options but not with the options uncommented
I put up a jsfiddle here. In my real grid I have cmTemplate specifed outside all my grids in a $.extend($.jgrid.defaults,{}) -it still causes the same problem

$('#Table').jqGrid({
    cmTemplate: {
        searchoptions: {
           // sopt: ['eq', 'ne', 'cn'] //un comment this line then run again and try to use filtere to see the difference
        }
    },
    datatype: 'local',
    data: [{
        Code: 'code1'},
    {
        Code: 'code2'},
    {
        Code: 'code3'}],
    colNames: ['Code'],
    colModel: [{
        name: 'Code',
        index: 'Code'}],
    pager: '#Pager'
}).jqGrid('filterToolbar', {
    searchOnEnter: false,
    defaultSearch: 'cn'
}).trigger('reloadGrid');
  • 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-06-06T03:55:32+00:00Added an answer on June 6, 2026 at 3:55 am

    I don’t see any problems in the code. If you set

    cmTemplate: {
        searchoptions: { sopt: ['eq', 'ne', 'cn'] }
    }
    

    you add searchoptions.sopt in all columns which don’t has the setting. Toolbar filtering can use only one searching operation per column. jqGrid uses defaultSearch parameter of filterToolbar for the searching, but to be able to have another searching operation for some columns it can be overwritten from the first operation of searchoptions.sopt array (see the answer for example).
    It is very important feature because which really required.

    So including searchoptions: { sopt: ['eq', 'ne', 'cn'] } option in all columns overwrite practically the option defaultSearch: 'cn' of filterToolbar to defaultSearch: 'eq'. Exactly in the way work the demo which you posted.

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

Sidebar

Related Questions

My grid is not filled, though the store is filled with json data. What
i have a gridview with search option by a database table.All working fine but
Please see the sample code below. Initially the grid comes up with no sort
I have a custom control with bindings like below <DataTemplate DataType={x:Type vm:EditorTabViewModel}> <me:MarkdownEditor Options={Binding
I have tested alot. Code is working fine in FIREFOX 5 but same code
i am working on struts2-jquery plugin . the below snippet is working fine in
I have been trying to find a solution to this one but could not
grid = [ ['x'] * w ] * h grid[0[2]] = 'a' This was
What grid library does swivel.com use? It looks pretty nice. Is it made inhouse?
When using the 960 grid, what is the proper way to make lists of

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.