How To Get The Selected Row Id In Javascript?
I'm trying to use the following JavaScript function to get a particular cell value from a jqgrid upon click. In the below function #datagrid is the table where the jqgrid is stored
Solution 1:
You should use getCell
function to read the value from the cell identified by row id.
So, You should try something like this:
$("#datagrid").click(function(){
var grid = jQuery('#datagrid');
var sel_id = grid.jqGrid('getGridParam', 'selrow');
var myCellData = grid.jqGrid('getCell', sel_id, 'MyColName');
});
Post a Comment for "How To Get The Selected Row Id In Javascript?"