Hi,
I tried using following code. it works only for 2 click of expand. if i clicked 3rd row it's not working.
I called this also in the beforeRowExpand(). and refer the data from the nested grid data.
var subContinentModel = function (data) {
var json = [{ 'select': 'Select Function' }, { "Counter": "Counter" }, { "Timer": "Timer" }];
var $subGridJson = {
dataModel: {
data: data,
location: "local"
},
colModel: [
{ title: "", minWidth: 27, maxWidth: 27, type: "detail", resizable: false, editable: false, sortable: false },
{ title: 'Display Name', dataIndx: 'display_name', editor: displayControl },
{
title: 'Function 1', dataIndx: 'functiontype1', editor: {
type: 'select',
options: json,
init: function (ui) {
var rowData = ui.rowData;
ui.$cell.find('select').change(function (evt) {
$grid.pqGrid("refresh");
});
}
}
}
],
height: 'flex',
width: "70%",
editModel: {
clicksToEdit: 1
},
showHeader: true,
numberCell: { show: false },
showBottom: false,
columnBorders: false,
scrollModel: { autoFit: true, flexContent: true },
showTop: false,
beforeRowExpand: function (event, ui) {
var dataList = $subGridJson.dataModel.data
dataList.map(function (elem, index) {
if (elem.pq_detail && elem.pq_detail.show) {
elem.pq_detail.show = false;
}
});
$grid.pqGrid('refresh');
}
};
This is the code of nested grid. Plz help me on this.
Thanks,
Vignesh.