DataTables Editor Select List - Set Selected Attribute
DataTables Editor Select List - Set Selected Attribute
This question has an accepted answers - jump to answer
This discussion has been closed.
This question has an accepted answers - jump to answer
Answers
Hi John,
You can't set the default value in the
ipOpts
array, but you can use thefields.def
option to set the default. For example you might have something like:Regards,
Allan
Duh of course...
Thanks for the quick reply Allan.
John
But that's not quite the same, for a new row in the table, def: would be ideal to set a default value but if you're editing a select list your 'selected' attribute isn't present and a user would need to re-select the correct value instead of it already being selected.
If you are editing a value and the value isn't in the select list, how would the user reselect it? Fundamentally if you edit an item, the value needs to be in the select list for it to be preselected on edit - I don't see how it could work otherwise?
Allan