Editor Datatables with Dropdownlist
Editor Datatables with Dropdownlist
tableFan
Posts: 10Questions: 7Answers: 0
hello,
I have a Datatables editor and would like to display one of the columns as a dropdown list. The data for the dropdown come from a sql server table. Can someone help me with that?
Thank you
Answers
See if this example gets you started.
Kevin
Hi, thanks for you answer
I don't want fixed values, as in the example, but values from a SQL Server table column. How can I just have the values of the column instead of label1 .... label2 ...?
options: [
{ label: "1 (highest)", value: "1" },
{ label: "2", value: "2" },
{ label: "3", value: "3" },
{ label: "4", value: "4" },
{ label: "5 (lowest)", value: "5" }
]
Here is another example. Click the
Ajax load
tab to see how the options are sent to the client.Kevin