Is it possible to get the value of the first column (The Table ID, which is hidden) when edit is selected? I would like to store this in a session variable for other tasks related to the ID
You can pick it via JS code OR pass to your PHP page for your operations.
e.g.
$col["default"] = "<a href='http://localhost/?id={id}'>My Page</a>";
JS:
On client side, you can have ids in this way, where "list1" is grid identifier.
var selr = jQuery('#list1').jqGrid('getGridParam','selrow');
I have looked at the 2 options you have presented. If I use the JS code on a click event of the div tag for the grid, as I don't know how else to fire an alert to look at the ID that it returns, please forgive me Am I missing something? here is a function I found on the site that I trying to implement, I will build a query string if I can get the ID out of the grid.
function get_parent_name()
{
// read value from selected row of list1
var selr = jQuery('#list1').jqGrid('getGridParam','selrow');
var rd = jQuery('#list1').jqGrid('getCell', selr, 'Time_ID');
alert(rd);
}
If you can share the complete code for review, i can suggest the changes.
It's difficult to identify issues with code snippets.
You can email at [email protected]