0

My primary question was preserve jqgrid scroll position when it is reloaded. I found the solution from below post. jqGrid paging question

But now I am facing another issue. I have added new row in grid and call my save method. So when grid is refreshed using above solution, I am not getting the Id of my new row.

Any help will be appreciated. Thanks..!

Manthan Makani
  • 119
  • 1
  • 6
  • What you mean with not getting the id - not get from where from server from grid or your new id is not created? Suppose you are in page 3 and add new record, the reloading with current true will reload the grid with this page and your new inserted record will be ordered as per your rule - i.e it can't be in current page 3. – Tony Tomov Jul 24 '18 at 08:05
  • Thanks @TonyTomov for the replay. I mean to say when I am adding new record in the grid and perform the save operation, data saved successfully. Not after save, I am reloading my jqgrid with $("#list").trigger("reloadGrid", [{current:true}]). Grid is refreshed but newly added record doesn't have the id which is there in database. It has 0 as Id. – Manthan Makani Jul 27 '18 at 06:49
  • If you have reloadAfterSubmit false, the record will remain with the id inserted, if the above option is false, then you should check your server side code if the id is inserted correct, but this all depend on your code. Example demonstrating the problem will help, since there are a lot of other options which my cause this issue. – Tony Tomov Jul 27 '18 at 08:36

0 Answers0