Hi Abu,
I have a master/detail grid.
How can I change the detail title when I select a row from master grid?
list1:
$col = array();
$col["title"] = "Unit";
$col["name"] = "count_type";
$col["width"] = "15";
$col["editable"] = false;
$col["hidden"] = true;
$col["align"] = "center";
$cols[] = $col;
list2:
$col = array();
$col["title"] = "$a";
$col["name"] = "count_type";
$col["width"] = "15";
$col["editable"] = false;
$col["hidden"] = true;
$col["align"] = "center";
$cols[] = $col;
$a is the value of count_type.
Thanks
Ho
For master grid, set onselect event.
$e["js_on_select_row"] = "do_onselect";
$grid->set_events($e);
and in html part add this script.
<script>
function do_onselect(id)
{
var ctype = jQuery('#list1').jqGrid('getCell', id, 'company'); // where invdate is column name
jQuery('#list2').jqGrid('setLabel','company',ctype);
}
</script>