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

The Archive Base Latest Questions

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

When I switched the jqGrid to use the advanced search – it seems to

  • 0

When I switched the jqGrid to use the advanced search – it seems to work fine, except it pops up with the above error “TypeError: Cannot read property ‘searchrules’ of undfined” in Chrome when you hit the find button. Weirdly in Firefox the error is: “TypeError: g is undefined”.

If I just click ok to the error, the page posts back to my MVC controller just fine. I just want the error to go – any ideas?
Here is the grid code:

jQuery("#list").jqGrid({
            url: '/Audit/GridData/',
            datatype: 'json',
            mtype: 'GET',
            colNames: ['Id', 'Date', 'Username', 'ObjectName', 'Event', 'Module'],
            colModel: [
      { name: 'Id', index: 'Id', width: 100, align: 'left', searchrules: { required: true }, search: true },
      { name: 'Date', index: 'DateStamp', width: 100, align: 'left', searchrules: { required: true }, search: true },
      { name: 'Username', index: 'Username', width: 200, align: 'left', searchrules: { required: true }, search: true },
      { name: 'ObjectName', index: 'ObjectType', width: 200, align: 'left', searchrules: { required: true }, search: true },
      { name: 'Event', index: 'Event', width: 120, align: 'left', searchrules: { required: true }, search: true },
      { name: 'Module', index: 'Module', width: 120, align: 'left', searchrules: { required: true }, search: true}],
            pager: '#pager',
            rowNum: 10,
            postData: {
                filters: '{"groupOp":"AND","rules":[{"field":"invdate","op":"gt","data":"2007-09-06"},{"field":"invdate","op":"lt","data":"2007-10-04"},{"field":"name","op":"bw","data":"test"}]}'
            },
            pgbuttons: true,
            rowList: [5, 10, 20, 50],
            sortname: 'Id',
            sortorder: "desc",
            viewrecords: true,
            imgpath: 'http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.16/themes/redmond/images/',
            caption: 'Audits'
        }).navGrid('#pager', { search: true, edit: false, add: false, del: false, searchtext: "Search" }, {}, {}, {}, { multipleSearch: true, sopt: ['eq', 'bw', 'cn', 'gt', 'lt'] });

Thanks

  • 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-29T20:38:23+00:00Added an answer on May 29, 2026 at 8:38 pm

    You use very strange value of the postData.filters. It contains the rules for invdate and name fields which are not exist in the grid. I suppose that correct data will be something like

    postData: {
        filters: '{"groupOp":"AND","rules":[' +
            '{"field":"DateStamp","op":"gt","data":"2007-09-06"},' +
            '{"field":"DateStamp","op":"lt","data":"2007-10-04"},' +
            '{"field":"Username","op":"bw","data":"test"}]}'
    }
    

    In any way you should use the values from the index properties of the colModel which you use.

    Additionally you should remove deprecated option imgpath which will be just ignored by jqGrid having version higher as 3.4.x.

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

Sidebar

Related Questions

I switched from Zend Debugger to XDebug, while I got XDebug to work fine,
I've recently switched focus from VB.NET to C# due to some decisions at work.
I just switched from Eclipse to IntelliJ and noticed that when I use Reformat
I switched to xcode 3.2.3 last week and curiously I cannot display variable values
I switched to Postgres recently and things were working fine. I had to make
Firstly I used this call jQuery('#grid').jqGrid('editRow',id,true,pickdates); , it worked fine with UI Datepicker integration,
This morning I switched to postgresql and now my where selects dont work anymore.
I switched to work on another computer, I installed visual C# express and protoBuf-net,
I switched to the dvorak keyboard layout about a year ago. I now use
I switched from using Visual Studio Ultimate 2010 and I am trying to work

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.