ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: resolvecomputing on September 25, 2018, 04:09:59 pm
-
I have 1 case with multiple select in row, and I tried create model for that Column like below:
{ title: tran('users'), dataType: "html", dataIndx: "users",
editor: {
type: "select",
attr: "multiple",
valueIndx: "user_name",
labelIndx: "user_name",
options: function() {
return usersList
},
listeners: 'change',
init: function(ui) {
ui.$editor.pqSelect({
bootstrap: { on: true } ,
checkbox: true,
radio: true,
});
}
}
},
And it's working for choosing, but after I choose and comeback, selected value gone.
Can you help me, thanks!
-
It should be listener: 'change'
-
I changed but selected value still gone.
-
Multi select value is an array of options which is seralized to a string when saved in a cell.
So restore the array from string and reassign it to the multi select list in the editor initialization function.
init: function (ui) {
ui.$editor.val( (ui.cellData || "").split(",") ).pqSelect({
checkbox: true,
radio: true
});
},
-
It's working now, thanks!