简体   繁体   English

jqGrid - 有“网格编辑模式”吗?

[英]jqGrid - Is there any “grid edit mode”?

I'm new with the jqGrid and I want to know if there is any way I can set the whole grid in edit mode. 我是jqGrid的新手,我想知道是否有任何方法可以在编辑模式下设置整个网格。

I just have one editable column. 我只有一个可编辑的专栏。 It is basically a checkbox list. 它基本上是一个复选框列表。 My first approach was this code when the user enters in edit mode: 当用户进入编辑模式时,我的第一个方法就是这段代码:

var ids = $("#tblPermisos").jqGrid('getDataIDs');
for (var i = 0; i < ids.length; i++)
    $('#tblPermisos').editRow(ids[i], false);

This seem to work great, but when the users changes the page all rows in edit mode are canceled (or saved, don't know). 这看起来效果很好,但是当用户更改页面时,编辑模式中的所有行都会被取消(或保存,不知道)。 I'd prefer to avoid handling the events to keep edit mode for all rows. 我宁愿避免处理事件以保持所有行的编辑模式。 So, back to my question, is there any "grid edit mode" or other simpler way than handling events? 那么,回到我的问题,是否有任何“网格编辑模式”或其他比处理事件更简单的方法?

I did a little online research, and I did not find any "toggle" to keep a grid in edit mode continuously. 我做了一些在线研究,我没有找到任何“切换”来连续保持网格处于编辑模式。 Places I looked are jqGrid: All rows in "inline edit mode" by default and http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing#editrow 我看过的地方是jqGrid:默认情况下所有行都采用“内联编辑模式”,并且http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing#editrow

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM