Can you enter select input options in COL def (rather than in the dataset)?
Can you enter select input options in COL def (rather than in the dataset)?
thegamechangerpro
Posts: 81Questions: 30Answers: 1
I use JSON for my dataset and don't want to pass in my list options that way.
Is it possible to add the select input options in ColDefs (for example) in dataTables? I can't find an example of this.
Answers
Are you using these options for a search input, Editor field, or what? Please provide more details of what you are trying to do so we can provide more specific suggestions.
Kevin
Hi Kevin,
This is for inline editing in datatables (not editor).
Thanks,
One option is to use
columns.render
to render the select list. The source of the list of options is up to you. Take a look at this example. Click the HTML tab and you will see hard coded select options using an HTML sourced table.Kevin
When you say inline editing, but not Editor - are you referring to the main editing interface? Are you using Editor to do the inline editing?
I don't fully understand this - do you mean you want a
select
element permanently shown in the table cells?Allan