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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:16:07+00:00 2026-05-22T18:16:07+00:00

I’m using jqGrid as a client side grid input, allowing the user to input

  • 0

I’m using jqGrid as a client side grid input, allowing the user to input multiple records before POSTing all the data back at once.

I’m having a problem where if the user has added a few records (say 3 ) the id’s for the records will be 1,2,3. if the user deletes record 2, you’re left with 1 and 3 for the id of the records.

When the user now adds a new records, jqGrid assigns that records the id 3 again since it just seems to count the total records and increments it by one for the new record. This causes problems when selecting rows as now the row id’s are 1, 3 and 3.

Does anyone know how to access the row ids of records as I could probably use the afterSubmit event and reassign the row id’s increasing from 1. ( so after i delete row id 2, this will set the other row id’s to 1 and 2)

Any other suggestions to solve this problem?

Thanks

edit
I’ve solved this with the following code for the delete navGrid button

  }).navGrid('#pager', {add:true, del:true, refresh:false, search:false},
    {
    ...
    }, ##edit parameters
    {
    ...
    }, ##add parameters
    {reloadAfterSubmit:false,
    clearAfterAdd:false,
    afterComplete:
        function () {
            ## clear and readd the row data so the row ids are sequential
            var savedData= $("#inputgrid").jqGrid('getRowData');
            $("#inputgrid").jqGrid('clearGridData');
            $("#inputgrid").jqGrid('addRowData', 'rn', savedData);

        }
    }  ##delete parameters
);

Basically just saving the grid data and then re-adding it so that the rowids are sequential again.

For some reason it causes the row numbers down the left side to go start from 2 instead of one. Edit this was solved by using the latest jqGrid code in GitHub (27th April 2010). But I found out that that version of jquery.fmatter.js caused empty cells to show ” ” when you tried to edit the row so I had to revert that file back to the one in jqGrid 3.6.4.

  • 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-22T18:16:08+00:00Added an answer on May 22, 2026 at 6:16 pm

    Solved as indicated in the edit section of the question

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

Sidebar

Related Questions

I need to clean up various Word 'smart' characters in user input, including but
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
In order to apply a triggered animation to all ToolTip s in my app,
I'm making a simple page using Google Maps API 3. My first. One marker
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

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.