Disable click event in row in jqGrid

In jqgrid grid, I have a checkbox as the first column and some other columns. When I click on the line (everywhere), the checkbox switch is checked or checked.

Could you tell me how the click event is for all rows? I would like to do this after mesh generation, because the mesh is created by the wireframe.

Thanks,

+1
source share
1 answer

You can use the setGridParam method to register the beforeSelectRow event beforeSelectRow in an existing grid. This handler must return false to cancel the select operation.

In your case, you can use the is () method on target to determine if a click on the checkbox has been set. The end result will be something like:

 $("#yourGrid").jqGrid("setGridParam", { beforeSelectRow: function(rowId, e) { return $(e.target).is("input:checkbox"); } }); 
+2
source

Source: https://habr.com/ru/post/920668/


All Articles