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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:37:51+00:00 2026-06-11T16:37:51+00:00

I am trying to add/edit data into my JQGrid. Currently the first column is

  • 0

I am trying to add/edit data into my JQGrid. Currently the first column is populated and then the other six are blank and are dependent upon the first column. So I need to add or “edit the blank” the data in the other six columns while the first remains the same.

Right now I am just trying to get access into the JQGrid to edit my current data. The function below is what I have setup so far. It gets passed the time (the first columns data), the number of ohms (data to enter the grid), and the column name. It builds my data set and then tries to add it to rowid 0. This is hardcoded just because I’m trying to get it to work right now. Then I access the JQGrid, add the rowdata and it actually returns a success, but nothing has been added to the JQGrid.

*note – this is all done within my javascript file

function AddRow(elapsedTime, numMOhms, mColumn)
{
    switch(mColumn) 
    {
        case 'a':
        case 'A':
            dataToAdd = [{TestTime:elapsedTime,RdgA:numMOhms,CorrA:"",RdgB:"",CorrB:"",RdgC:"",CorrC:""}];
            break;
        case 'b':
        case 'B':
            dataToAdd = [{TestTime:elapsedTime,RdgA:"",CorrA:"",RdgB:numMOhms,CorrB:"",RdgC:"",CorrC:""}];
            break;
        case 'c':
        case 'C':
            dataToAdd = [{TestTime:elapsedTime,RdgA:"",CorrA:"",RdgB:"",CorrB:"",RdgC:numMOhms,CorrC:""}];
            break;
    }
    alert(JSON.stringify(dataToAdd));
    var success = jQuery("#polarizationTable").jqGrid('setRowData',0,dataToAdd[0]);
    if(success)
    {
        alert("y");
    }
    DrawGraph(true);
}

if you replace the last bit with this:

for(var i=0;i<=dataToAdd.length;i++)
  jQuery("#polarizationTable").jqGrid('addRowData',i+1,dataToAdd[i]);

I can get it to add, but it is a dumb add and just appends that data to the end instead of updating data in that row. I tried modifying it with hardcode and removing the for loop, and no luck.

Here is what my colModel/colNames looks like.

colNames:['Minutes','Reading A', 'Corr A', 'Reading B','Corr B','Reading C','Corr C'],
colModel:[
    {name:'TestTime',index:'TestTime', align:"center", sortable:false},
    {name:'RdgA',index:'RdgA', align:"center", sortable:false},
    {name:'CorrA',index:'CorrA', align:"center", sortable:false},
    {name:'RdgB',index:'RdgB', align:"center", sortable:false},
    {name:'CorrB',index:'CorrB', align:"center", sortable:false},       
    {name:'RdgC',index:'RdgC', align:"center", sortable:false},     
    {name:'CorrC',index:'CorrC', align:"center", sortable:false}        
],
  • 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-11T16:37:52+00:00Added an answer on June 11, 2026 at 4:37 pm
     var success = jQuery("#polarizationTable").jqGrid('setRowData',1,dataToAdd[0]);
    

    JQGrid’s first row is 1, not 0. Go figure. Works now, just need to figure out the updating while keeping remaining data intact.

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

Sidebar

Related Questions

I'm trying to add an edit function to my web app but I'm having
Am trying to add a link besides the Edit | Delete links in wordpress
I am trying to add a simple form to allow my users to edit
i`m trying to make an NSMutableArray From NSUserDefaults so i can add/delete and edit
I am trying to manipulate SharePoint's default calendar to add, edit and delete items
I'm trying add data triggers to the default combobox style so each text item
Trying to add a blank sample app for a rails tutorial to GitHub, but
I'm trying to use form editing on jqgrid. When the data is sent to
I am trying to add a new payment module into Magento. However, even after
I am trying to use the JQGrid plugin and have run into an issue

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.