防止行双待可编辑 - jqGrid [英] Prevent row becoming editable during double click - jqGrid
问题描述
multiselect =true和editinline =true
我们在每行的数据中添加了自定义编辑按钮,并希望该行只能通过该按钮进行编辑。我们已经删除了编辑的导航栏/工具栏图标。
目前,即使在双击该行时,数据行也可以编辑。我们能捕捉到这个事件,但是如何取消这个动作呢?我们尝试返回假,停止..但他们没有工作。我们甚至尝试停止执行,仍然可以编辑这行。
我们该如何阻止?
将其添加到您的jqgrid以及其他参数
ondblClickRow:function(){
return false;
},
或使用jquery u可以绑定双击事件(ondblClickRow)到你的网格,并从该函数返回false。
Ours is a Struts2-jQuery Grid implementation , it is similar to jqGrid. We have made our Grid as
multiselect="true" and editinline="true"
We have added 'Custom Edit' buttons in each row's data and want the row to become editable only via that. We have removed the navbar/tool bar icons for 'Edit'.
Currently, the data row becomes editable even during a double click on the row. We are able to capture the event, but how to cancel out the action ? we tried returning false, stop.. but they did not work. We even tried stop.propogation and still the row was becoming editable.
How can we stop this ?
add this to your jqgrid along with other parameters
ondblClickRow: function(){
return false ;
},
OR using jquery u can bind double click event (ondblClickRow) to you grid and return false from that function.
这篇关于防止行双待可编辑 - jqGrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!