how to add dropdownlist in column of every row?

how to add dropdownlist in column of every row?

rajvhadlurerajvhadlure Posts: 2Questions: 1Answers: 0

how to add dropdownlist with db records.

This question has an accepted answers - jump to answer

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119
    Answer ✓

    your question is a little to generic. What have you tried?

  • rajvhadlurerajvhadlure Posts: 2Questions: 1Answers: 0

    i want to display status in every row with multiple option. (each row contain dropdownlist and in that list there are multiple status). that status is different in every row and also i update that status on dropdownlist selection for that particular field.

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    You could use columns.render to create a select element with the options you want to display.

    Allan

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    http://jsbin.com/hanaruh/3/edit?html,js,output is an overkill example of what Allan is taking about

  • shamilshamil Posts: 6Questions: 1Answers: 0
    edited July 2017

    And it is possible to use the search for these fields?

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Not really no. The problem is that DataTables uses cached information rather than querying the DOM for each filtering action (because that would be horribly slow). You can sort of do it using this example but it isn't really suited for filtering I'm afraid.

    Allan

  • shamilshamil Posts: 6Questions: 1Answers: 0

    Thanks, I'll try to understand :)

  • Igorski88Igorski88 Posts: 25Questions: 8Answers: 0

    The above answers helped a lot. However, how do I register the selected value of the DropDown(select) box?

This discussion has been closed.