Skip to content

Display field value from grid using custom event

I have this working now so that when the user clicks on the row 

the contents of the cell I want are returned - is it possible to do it when 
they just click on the cell instead rather than the whole row?

My code for row select:

An event as follows:

$dg -> add_event("jqGridSelectRow", $onSelectRow);
$onSelectRow = <<<ONSELECTROW
function(status, rowid) 

var cont = $('#upload_data').jqGrid('getCell',rowid,'FILE_NAME');"".concat(cont))

Use "jqGridCellSelect" event instead. Everything else stays the same.

Code sample (untested):

$dg -> add_event("jqGridCellSelect", $onSelectCell);

$onSelectCell = <<<ONSELECTCELL
function(rowid, colName, cellContent, rowIndex, colIndex)
var cont = $('#upload_data').jqGrid('getCell',rowid,'FILE_NAME');"".concat(cont))

Feedback and Knowledge Base