Checkbox in datatable to populate the values in input hidden!

Checkbox in datatable to populate the values in input hidden!

klermannklermann Posts: 277Questions: 67Answers: 1

Hello rf1234, I once asked myself a question about the same question. As I have a checkbox inside the datatable that does not have the same behavior as the Editor to populate the values, how do I solve this problem by clicking on the checkbox set the values ​​in hidden fields?
https://datatables.net/forums/discussion/comment/131090#Comment_131021

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    you use and event handler that you put on the checkbox to update the data object associated with the row.

    here is an example that adds all the rows that have been checked to a grand total
    http://jsbin.com/joxiri/7/edit?html,js,output

  • klermannklermann Posts: 277Questions: 67Answers: 1

    Is this just for a checkbox? It is? I need to set values ​​in other fields, which are hidden!

  • colincolin Posts: 15,146Questions: 1Answers: 2,586

    In @bindrid 's example, the checkbox is just triggering the function - in that trigger you can do whatever you like, such as setting visible or hidden fields. This sounds exactly like what you're after.

This discussion has been closed.