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)?

thegamechangerprothegamechangerpro 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

  • kthorngrenkthorngren Posts: 20,300Questions: 26Answers: 4,769

    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

  • thegamechangerprothegamechangerpro Posts: 81Questions: 30Answers: 1

    Hi Kevin,
    This is for inline editing in datatables (not editor).
    Thanks,

  • kthorngrenkthorngren Posts: 20,300Questions: 26Answers: 4,769

    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

  • allanallan Posts: 61,714Questions: 1Answers: 10,103 Site admin

    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?

    Is it possible to add the select input options in ColDefs

    I don't fully understand this - do you mean you want a select element permanently shown in the table cells?

    Allan

Sign In or Register to comment.