简体   繁体   English

对jqGrid中的完整网格禁用内联编辑

[英]Disable inline editing for full grid in jqGrid

How can I disable inline editing mode while I click on any row in jqGrid.? 单击jqGrid中的任何行时,如何禁用内联编辑模式?

onSelectRow: function(id) {

 $("#toolbar").setColProp('mt_desc',{editable:false});

      }, 

I got this one solution. 我得到了一个解决方案。 but I think it's not feasible to add for every column name and add them into function. 但是我认为为每个列名称添加并将其添加到函数中是不可行的。

Whenever I click on edit button in actions, at that time Inline mode should be enable otherwise It must be disable. 每当我在操作中单击“编辑”按钮时,都应启用内联模式,否则必须禁用。 How can I do this? 我怎样才能做到这一点?

Can anybody please help me ? 有人可以帮我吗?

I got answer for question, I am posting this answer over here. 我得到了问题的答案,我将这个答案发布在这里。 Cause it may be helpful for you. 因为它可能对您有帮助。 You can disable every cell of row while you click on any cell using onSelectRow. 使用onSelectRow单击任何单元格时,可以禁用该行的每个单元格。

onSelectRow: function(id) {
      if (id && id !== lastSel) {
      $("#toolbar").jqGrid('restoreRow',lastSel);
      var cm = $("#toolbar").jqGrid('getColProp','Name');
      cm.editable = false;
      lastSel = id;
      }
      }, 

I got my solution. 我找到了解决方案。 Thanks 谢谢

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

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