ozil
ozil

Reputation: 7117

Jqgrid how to write cell click event

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

Upvotes: 0

Views: 21008

Answers (4)

BlackHack123
BlackHack123

Reputation: 349

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

Upvotes: 0

Nikhil Meher
Nikhil Meher

Reputation: 47

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

onCellSelect: function (rowId, iCol, content, event) {
      //YOUR STUFF
    }

Upvotes: 1

Oleg
Oleg

Reputation: 222017

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.

Upvotes: 2

Yogesh
Yogesh

Reputation: 354

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

ondblClickRow: function (rowId, iRow, iCol, e) { //Your Code  }

Upvotes: 0

Related Questions