Add rows with checkboxes

Add rows with checkboxes

krokonosterkrokonoster Posts: 10Questions: 0Answers: 0
edited February 2012 in General
I'm loading a form with a DataTable without any rows.
User will click "Add", get a jQuery UI dialog form allowing them to add a record to the table. (all fine so far using fnAddData)

However I would like a (1) checkbox next to each row and when a function called, loop over all rows and (2) delete any row which have a checked checkbox.

I'll keep searching,but so far all I could find was how to delete a row (fnDeleteRow) but not how to add a checkbox with function call when adding rows.

Thanks in advance,
Krok

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    To add a checkbox just put the checkbox HTML into the column that you want the checkbox to appear in when using fnAddData.

    Allan
  • krokonosterkrokonoster Posts: 10Questions: 0Answers: 0
    edited February 2012
    Awesome. It did not occur to me that one might be able to add markup in there.
This discussion has been closed.