How to Load dynamic dropdown list in data table column

How to Load dynamic dropdown list in data table column

PSPL-SHASHIPSPL-SHASHI Posts: 2Questions: 1Answers: 0

i am using datatable in my mvc project. i got requirement to load the dynamic dropdownlistfor in datatable columns. like
"targets": [15], "visible": true, "bSortable": true, "mDataProp": "Status",
"render": function (data, type, row) {
--------------- need to load dropdown here-------------------
}

can anybody can help or give the example source code. Thank you

Answers

  • kthorngrenkthorngren Posts: 14,171Questions: 25Answers: 3,343

    Take a look at the examples in the columns.render docs. There are a couple that show rendering HTML elements. You would do something similar for the select list. If you still need help please provide more details of the data source for the select lists and what you want to do with them. A test case showing what you are trying to do will help us to understand exactly what you want to provide more specific help.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

Sign In or Register to comment.