Hello,
In Grid I have one select editor (dropdown) and that dropdown.
http://jsfiddle.net/m8j7udte/Dropdown bind with Options list something like as below:
pq.ItemTypeList = [
{ id: "1", name: "Item Type1", "pq_selected": true },
{ id: "2", name: "Item Type2" },
{ id: "3", name: "Item Type3" },
];
I have bind it with one column like
{
title: "Item Type", dataIndx: "itemtypeid", width: 200, sortable: false,
editor: {
type: "select",
labelIndx: "name",
valueIndx: "id",
prepend: { "Default": "Default" },
options: pq.ItemTypeList,
},
render: function (ui) {
var cellData = ui.cellData;
if (cellData != null && cellData != "") {
return ui.cellData;
}
else {
ui.rowData.itemtype = "Default";
return "Default";
}
}
},
In the DB I am saving Value field so for example "1", "2" etc... on UI it not showing selected label text and it showing "1" instead of "Item Type1"
Can you please tell me what is issue in configuration?
Thanks