Editor Datatables with Dropdownlist

Editor Datatables with Dropdownlist

tableFantableFan Posts: 10Questions: 7Answers: 0
edited July 2021 in DataTables

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

  • kthorngrenkthorngren Posts: 21,327Questions: 26Answers: 4,949

    See if this example gets you started.

    Kevin

  • tableFantableFan Posts: 10Questions: 7Answers: 0

    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" }
    ]

  • kthorngrenkthorngren Posts: 21,327Questions: 26Answers: 4,949

    Here is another example. Click the Ajax load tab to see how the options are sent to the client.

    Kevin

Sign In or Register to comment.