Hi, I have a datatable with data loaded by a server (using a json format). I have a column with name of companies. At the beginning I load data in the datatable using content of sql table with the current values. I defined the column that I use with the combo in this way :
{ id:“id”, header:“Supplier”,width:200,editor:“combo”,
options:"…/fcorder/reports/GetFournisseur.php"}
Options are loaded by a php program that returns the list of options (id, value).
When I load the datatable I see the correct name of company . When I edit the fields I see all combo options but when I select one item the value on the column does not change.
I tried also to force, but without success:
“onAfterEditStop”:function(state, editor, ignore){
editor.setValue(state.value);}
Any help is appreciated.
Massimo
can you share a snippet?
webix.ui({
view:“datatable”,
id:“exc”,
editable:true,
select:“cell”,
columns:[
{ id:“sid”, header:"", width:50,group:2,hidden:true},
{ id:“id”, header:“Supplier”,width:200,
editor:“combo”,
options:[{id:1, value:“abc”},{id:2, value:“def”}
]
}
] ,
autoheight:true,
autowidth:true,
math: true,
data:[{sid:1,id:“1”}]
});
you are trying to change item’s id.
this is not allowed.
ok, but I know that select or combo are based on the (id, value) couple.
I used id because this (the true id of the row for me is “sid”