1

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 ?

yathirigan
  • 5,619
  • 22
  • 66
  • 104

1 Answers1

0

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.

Piyush Sardana
  • 1,748
  • 4
  • 19
  • 33
  • we are going to try it now.. do you mean we have attach/bind this function to the entire grid ? – yathirigan Jul 25 '12 at 14:13
  • okay there are two methods ...first you write this code along with other parameters where you write all jqgrid parameters like colModal, colName, pager or you can bind this with $("#grid").bind("ondblClickRow", function(){return false;});....like this also..i hope this works for you. – Piyush Sardana Jul 25 '12 at 16:20