1. How can I select first row in master table when loading page so I can see detail records.
2. How can values in select/dropdown column from other table (get_dropdown_values function) be refreshed with grid reload? New values are not showing if I reload the grid. I must refresh the whole page and then they appear
Thanks
1) Following config will select the first row of grid on load event. You can customize as per your need.
PHP:
$e["js_on_load_complete"] = "grid_onload";
$grid->set_events($e);
JS:
function grid_onload(ids)
{
// get row ids from grid (with id: list1)
var ids = $("#list1").jqGrid('getDataIDs');
setTimeout( function(){ jQuery('#list1').jqGrid('setSelection', ids[0], true); },100);
}
Also check: https://phpgrid.desk.com/customer/portal/questions/2196686-select-row-on-load-page
2) To refersh dropdown each time it's displayed you need to set onload-sql param,
Emailing you a demo code and updated lib.