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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:28:54+00:00 2026-05-21T10:28:54+00:00

i know this sounds simple for some people out there. i also tried this

  • 0

i know this sounds simple for some people out there. i also tried this one. but for some reason, i really can’t refresh and view my newly added, edited and deleted in jqgrid.

i am making a button in my program that would add, edit and delete and after that, it will refresh my jqgrid and display what ever change i’ve made in their. for example, i added new data,. in first attempt, it will display the newly added data but in the second time around, it wont show anymore. my edit and delete data won’t refresh also. here’s the code:

function Edit(){  
   var selected = $("#list1").jqGrid('getGridParam', 'selrow');  
   var dat = {
     "ID": 'xyz',
     ...
     "keyFields": [{"..."}] 
   };                
  update(dat); 
  $('#list1').trigger('reloadGrid');  
} 

function update(dat){
  $.ajax({
     type: 'GET',
     url: 'mydata.php?' + $.param({path:'this/update',json:JSON.stringify(dat)}),
     dataType: Settings.ajaxDataType,
     success: function(data) {
       if ('error' in data)
       {
         alert('ERROR']);
       }
    }
  });
}

the server side is ok and updated whatever i do in the screen. when i first do this with add button only, there’s no problem at all. problem came up only after my edit and delete button. hope someone can help me understand this.

  • 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-21T10:28:55+00:00Added an answer on May 21, 2026 at 10:28 am

    You don’t posted any definition of the jqGrid which you use, so I can say only what is wrong in the code which you posted.

    First problem is that you have to place $('#list1').trigger('reloadGrid'); line inside of success handle of $.ajax call of your update function. Only after the data are successfully updated on the server you should trigger grid reload.

    The second possible problem you can have if you use loadonce:true parameter which change the original value of the datatype parameter of the jqGrid to datatype:'local'. If you use loadonce:true and need to reload the data from the server you have to reset the datatype parameter of the jqGrid to its initial value (‘xml’ or ‘json’ depend on what you use) and only then reload grid with respect of ‘reloadGrid’. To change the datatype you can use setGridParam method of jqGrid.

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

Sidebar

Related Questions

Hey all. I know this sounds simple, but I can't find a way to
i know this sounds really common and so trivial but , am having a
I know, I know, sounds silly, but I am having this one variable passed
I know this sounds like a broad question but I can narrow it down
OK I know the title sounds really confusing, but really it's quite simple. Consider
I know this sounds extremely newbieish, but even after going through some of the
I know this sounds like a homework assignment, but it isn't. Lately I've been
I know this sounds confusing: I have just built some basic prev/next pagination for
I know this sounds somewhat counterintuitive, but let me explain what I am trying
I know this sounds like a dumb question but I need to ask this.

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.