Editor Datatables with Dropdownlist

Editor Datatables with Dropdownlist

tableFantableFan Posts: 7Questions: 5Answers: 0
edited July 19 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: 13,852Questions: 25Answers: 3,262

    See if this example gets you started.

    Kevin

  • tableFantableFan Posts: 7Questions: 5Answers: 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: 13,852Questions: 25Answers: 3,262

    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.