Hi
I have some problem related to editor.
Here is my JSON data.
var itemlist = [
{"id":"A1-B1-2","name":"glove", "deliverytime":"5", "unitprice":2},
{"id":"A1-B1-3","name":"cap", "deliverytime":"5", "unitprice":3},
{"id":"A1-B2-1","name":"mask", "deliverytime":"10", "unitprice":2},
{"id":"A2-B1-4","name":"needle","deliverytime":"11", "unitprice":1}];
and I describe colModel like below.
var colM=[
{title: "id", dataIndx: "id",
editor: {
type: "select",
valueIndx: "id",
labelIndx: "name",
dataMap: ['deliverytime','unitprice'],
selectItem: {on:true},
options: itemlist
}
},
render: function(ui){
var cellData=ui.cellData;
var al=itemlist.length;
for(var i=0;i<al;i++){
if(cellData==itemlist.id){
return itemlist.id;
}
}
}
},
{title: "deliverytime", dataIndx: "deliverytime"},
{title: "deliverytime", dataIndx: "unitprice"},
]
When I select "A1-B1-2", I can't select "A1-B1-3" and "A1-B2-1".
However I can select "A2-B1-4".
And I can select "A1-B1-3" and "A1-B2-1" after I select "A2-B1-4".
Probably the problem is I can't select item which has same data.
Is this my code problem or some kind of bug?