Hi.
$grid_options[“onSelectRow”] = “function(id){ $(‘#detailgrid’).jqGrid(‘setCaption’,’Customer ID =’ + id); }”;
I need to show the Customer name instead of Id on detail grid caption. How can I get the Customer Name from selected row?
1 Answers
Hello,
Assuming you have a column with name ‘custname’ of grid id ‘list1’, then:
$grid_options[“onSelectRow”] = “function(id){
var row = $(‘#list1’).getRowData(id);
$(‘#detailgrid’).jqGrid(‘setCaption’,’Customer:’ + row.custname);
}”;
Your Answer