最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - JQGrid update multiple rows at once then save - Stack Overflow

programmeradmin1浏览0评论

I have a requirement to be able to update 'n' number of rows in one go.

I have acheived this by adding a SELECT into the column header of 1 particular column. This will give the user the option of picking a Yes/No option and making all subsuequent rows in said particular column in the grid view, the choice of Yes or No dependant on which the user chooses.

I have successfuly managed to do this. My problem is now sending the "New" updated row data to the server.

I have tried saveRow() with the row id of each row in the view. This does not do anything. No AJAX calls are made.

Can someone point me in the right direction?

Thanks

I have a requirement to be able to update 'n' number of rows in one go.

I have acheived this by adding a SELECT into the column header of 1 particular column. This will give the user the option of picking a Yes/No option and making all subsuequent rows in said particular column in the grid view, the choice of Yes or No dependant on which the user chooses.

I have successfuly managed to do this. My problem is now sending the "New" updated row data to the server.

I have tried saveRow() with the row id of each row in the view. This does not do anything. No AJAX calls are made.

Can someone point me in the right direction?

Thanks

Share Improve this question asked Feb 11, 2013 at 13:07 user1124378user1124378
Add a ment  | 

2 Answers 2

Reset to default 5

I write the answer only because you asked to point you in the right direction. Sending of the data from the local grid to the server is not plex (see here for example). The main problem is the case is concurrency.

In my opinion any web application should work not only as one user application. I wrote multiple answers (see here or here for example) where I described my opinion that one should better update modified rows directly after modification because of possible concurrency errors. The later the update take place the higher is the possibility that the same rows were already modified by another user from another puter. So I would remend you to use standard saveRow behavior and send modified data directly after the modification.

I have solved this by simply making an AJAX call myself to the file that is declared in JQGrid. Passing all relevant data everything worked how I needed it to

发布评论

评论列表(0)

  1. 暂无评论