Hello admin,
Please reply
1. how to get hierarchical JSON object into dataindx?
2. I have JSON of Brach list
branchList = [{ label:'Mumbai',value:'1'},{ label:'Mumbai2', value:'2'},{ label:'Mumbai3', value:'3'}]
Here label is branch name and value is branch id.
{ title: "Branch", dataIndx: "branchId", width: 90,
editor: {
type: "textbox",
init: autoCompleteEditor,
options: branchList,
focus: function (ui) {
alert("focus")
}
},
render: function (ui) {
var options = ui.column.editor.options,
cellData = ui.cellData;
for (var i = 0; i < options.length; i++) {
var option = options[i];
if (option.value == cellData) {
return option.label;
}
}
}
},
Here my dataIndx:branchId. values are 1 or 2 or 3
In render function I am able to display branch name of corresponding branch id.
but when i goes to edit mode I m getting branch id. Please see attached snapshot.
After selection of item it is showing branch name.
Please reply.