Search code examples
jqgridmvcjqgrid

RowBinding event in jqgrid


Is there any event like "RowBinding" in jqgrid. I need to add a image tag to a column of each row data in client side under some conditions.

Something like this,

 RowBinding: function (rowId, rowData) {
           //After manipulating the data it should get bind to the grid.
                }

If there is any alternative please guide me.


Solution

  • I recommend you to use custom formatter in the column where you need to place image. By third parameter (rowObject) of custom formatter you have access to all values of the row. If you need do some additional actions on click on the image you can use beforeSelectRow callback additionally. I would recommend you to read the answer and this one.