Hi Isomorphic,
I work with the latest build (v12.1p_2020-06-20) and trying to have a SelectItem with multple="true" that supports
getting and storing its data as comma-seprataed string, instead of an array which is the default behavior.
This is a working example, that only supports setting the item value with a string: mySelect.setValue("US,JA")
I didn't manage to have its value also stored as a string.
I tried overriding setValue\storeValue functions, but this broke the control's functionality.
Based on https://www.smartclient.com/smartcli...ocalDataSource
with these modifications:
Could you please guide me on how to have the stored value to be a string as well?
(in my example, I would expect it to be "US,JA")
I work with the latest build (v12.1p_2020-06-20) and trying to have a SelectItem with multple="true" that supports
getting and storing its data as comma-seprataed string, instead of an array which is the default behavior.
This is a working example, that only supports setting the item value with a string: mySelect.setValue("US,JA")
I didn't manage to have its value also stored as a string.
I tried overriding setValue\storeValue functions, but this broke the control's functionality.
Based on https://www.smartclient.com/smartcli...ocalDataSource
with these modifications:
Code:
isc.DynamicForm.create({
ID:"exampleForm",
width:450,
wrapItemTitles: false,
fields: [
{
ID: "mySelect",
name: "mySelect",
type:"select",
title:"Select Multiple (PickList)",
multiple:true,
multipleAppearance:"picklist",
valueField: "countryCode",
displayField: "countryName",
optionDataSource: "countryDS",
setValue: function (newValue){
if (isc.isA.String(newValue)) newValue=newValue.split(",");
this.Super("setValue",[newValue]);
}
},
]
});
mySelect.setValue("US,JA");
(in my example, I would expect it to be "US,JA")
Comment