Jqgrid how to write cell click event

后端 未结 4 1074
面向向阳花
面向向阳花 2020-12-22 08:00

I want to write an event when user click on a cell of jqgrid. Is there build in method? I could not find any event at this link

相关标签:
4条回答
  • 2020-12-22 08:29

    Callbacks and jQuery events are described here. jqGrid register click handler on the body of the grid. Inside of the click handler the callbacks beforeSelectRow and later onCellSelect will be called. In the same way jQuery events jqGridBeforeSelectRow and jqGridCellSelect will be called too.

    The callbacks and the events contains e parameter (jQuery Event object) which target property could be used to get all information about the click event if the other parameters of the beforeSelectRow callback (or onCellSelect callback) don't provides already what you need. The old answers: the answer, this one, this one, this one, this one, this one and many other provide you examples of the usage of onCellSelect and beforeSelectRow callbacks.

    0 讨论(0)
  • 2020-12-22 08:30

    there is a inbuilt event.. you can find it here LINK

    onCellSelect: function (rowId, iCol, content, event) {
          //YOUR STUFF
        }
    
    0 讨论(0)
  • 2020-12-22 08:33

    you can try with this

    onSelectRow: function(){
                    var row_id = $("#grid_nueva_caja_matriz").getGridParam('selrow');
                    jQuery('#grid_nueva_caja_matriz').editRow(row_id, true);
                }
    

    or you can use the differentes events how ondblClickRow you can check on the documentation of jqgrid

    0 讨论(0)
  • 2020-12-22 08:37

    We have double click event in jqgrid which can be used like this

    ondblClickRow: function (rowId, iRow, iCol, e) { //Your Code  }
    
    0 讨论(0)
提交回复
热议问题