JQGrid一次更新多行,然后保存 [英] JQGrid update multiple rows at once then save

查看:172
本文介绍了JQGrid一次更新多行,然后保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要求能够一次性更新'n'行数.

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

我已经通过在1个特定列的列标题中添加SELECT来实现此目的.这将使用户可以选择是/否"选项,并在网格视图的特定列中进行所有后续行的选择,是"或否"的选择取决于用户的选择.

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.

我尝试使用视图中每一行的行ID进行saveRow().这什么也没做.没有进行AJAX呼叫.

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?

谢谢

推荐答案

我之所以写答案,仅是因为您要求指出正确的方向.将数据从本地网格发送到服务器并不复杂(例如,请参见此处).主要问题是并发.

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 complex (see here for example). The main problem is the case is concurrency.

我认为任何Web应用程序都不应仅作为一个用户应用程序工作.我写了多个答案(请参见此处

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 computer. So I would recommend you to use standard saveRow behavior and send modified data directly after the modification.

这篇关于JQGrid一次更新多行,然后保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆