Comma Separated String as DataProp for Checkbox (Multiple Select) in Editor
Comma Separated String as DataProp for Checkbox (Multiple Select) in Editor
Hello Allan,
What is the best possible option, when using an Editor to edit a record that requires multiple choices for a field.
For Example :
Schedule Delivery Day : [] Monday [] Tuesday [] Wednesday [X]Thursday [X]Friday []Saturday [_]Sunday
When editing an existing record using data table editor, the dataProp has a comma separated string.
DataProp : "Thursday,Friday"
Also when editor passes back value to serverside, It would be preferred as comma separated string.
Using inOpts I am able to display multiple option in checkbox, however, what I can do to select multiple options.
case "checkbox":
{
editobj = {
"label": lbl + ":",
"fieldInfo": "" + lblinfo + "",
"name": "" + lblname + "",
"dataProp": localnumdata[i],
"type": "checkbox",
"ipOpts": Radio_Checkbox_OptionListLoad("csadataship" + lblname)
}
} break;
Thank You.
Answers
The
checkbox
field type has aseparator
option which you can use - e.g.That will tell the field to expect and send a comma separated string.
Allan