Skip to content

Get value from a specific cell from selected row

Add the following javascript to get the column value of selected row. Replace TABLE_NAME and COLUMN_NAME with your own value.

var row_id = getSelRows();

phpGrid equivalent (Note that the COLUMN_NAME is case sensitive)
$dg->set_grid_method("getCell", "###getSelRows()###", "COLUMN_NAME");

To get Column Name and Cell Contents of on Double Click:

$dg -> add_event("jqGridDblClickRow", $onSelectRow);
$onSelectRow = <<<ONSELECTROW
 function(rowid, iRow, iCol, e){
      var colNames = $(this).jqGrid(“getGridParam”, “colNames”);
      var colName = colNames[iCol];
      var colVal = $(this).jqGrid(“getCell”, rowid, iCol);

Feedback and Knowledge Base