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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:21:03+00:00 2026-05-30T02:21:03+00:00

I am having an issue with a JQGrid losing records when a column sort

  • 0

I am having an issue with a JQGrid losing records when a column sort occurs. For example, if there are 400 records, when the sort occurs, the record count drops to 20.

    $("#grdCaseFind").jqGrid({
  datatype: "local",
  height: 250,
  colNames:['SeqNo', 'Report Title', 'Location', 'Status', 'Date', 'Officer Name', 'Incident No.'],
  colModel:[
    {name:'SeqNo',index:'SeqNo', hidden:true},
    {name:'RepTitle',index:'RepTitle', align:"center", width:200},
    {name:'CaseAddr',index:'CaseAddr', align:"center", width:200},
    {name:'RepStatus',index:'RepStatus', align:"center", width:50},
    {name:'CaseBeginDate',index:'CaseBeginDate', width:70, align:"center"},
    {name:'RepOfficerName',index:'RepOfficerName', width:100, align:"center"},
    {name:'IncidentNo',index:'IncidentNo', width:80, align:"center"},
  ],
  multiselect: false,
  caption: "",
  onSelectRow: function (rowid, status) {
    if (status === false) {
      $(this).resetSelection();
      $("#btnOpen").attr("disabled", true);
     } else {
      $("#btnOpen").attr("disabled", false);
      $("#CaseSelectedIndex").val($("#grdCaseFind").getCell(rowid, "SeqNo"))
     }
  },
  ondblClickRow: function (rowid, iRow, iCol, e) {
    document.getElementById("btnOpen").click();
  },
  onSortCol: function (index, iCol, sortoder) {
    $("#btnOpen").attr("disabled", true);
  }
});

The data is filled from a JSON array stored on the form itself.

    grdCaseFindData = strFindResult.grdCaseFind;
    $(grdCaseFindData).each(function (i, e) {
      $("#grdCaseFind").addRowData(i + 1, e);
      $("#grdCaseFind").attr("rowNum", i + 1);
    });

I ran into this issue before, and by counting the records and setting the “rowNum” attribute, the issue was corrected. In my other grids, the only difference is that I am loading the records via a call to the server, which returns a JSON array. Any ideas of why this grid is not behaving like the others?

  • 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-30T02:21:05+00:00Added an answer on May 30, 2026 at 2:21 am

    Disregard the question. Apparently there is an issue with setting the rowNum attribute dynamically after the grid is initialized. The only work around I found to this was to either

    rowNum: -1
    

    Which only works in earlier versions of JQGrid, or

    rowNum: 9007199254740992
    

    Which is the maxInt size, an astronomically high number that is not likely to be reached.

    If anyone knows a more elegant and current solution, please correct my answer.

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

Sidebar

Related Questions

I'm having an issue in IE 6 and 7 when using jqGrid (v3.6.4) and
I'm using jqGrid and am having an issue with one cells data. The contents
I am having an issue with the using jqGrid with JSON data returned from
im having issue with getting position of an element. there are 4divs with position
Having an issue with random individuals trying to access an intranet site with a
Having an issue here that I have tried everything I can think of but
The issue I'm having is issue with is I'm trying to get the paintComponent
I'm having an issue with a query that currently uses LEFT JOIN weblog_data AS
I'm having an issue with my regex. I want to capture <% some stuff
I'm having an issue with a Flash/Flex erroring in Firefox but not IE. 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.