DataTables Editor - initEdit data does not contain multiple rows. How do I get all selected rows?

DataTables Editor - initEdit data does not contain multiple rows. How do I get all selected rows?

washuit-iammwashuit-iamm Posts: 133Questions: 55Answers: 2
edited May 2018 in Free community support

The data parameter of the initEdit only shows the first row selected. I need all selected rows. How can I do this?

I see I can do table.rows( { selected: true } ) but why wouldn't initEdit provide me with an array of data?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    Its a legacy issue that. Multi-row editing was only introduced in 1.5, so to allow for backwards compatibility, the old functionality was retained.

    initEdit does actually pass in two more parameters that is documented (urgh - I'll fix that!). The forth parameter is the modifier that was used to activate the editing (e.g. the selected rows) and the fifth is the type of editing mode. The forth parameter is the one you want.

    Allan

This discussion has been closed.