edit cells by index array
edit cells by index array
ludwigm
Posts: 12Questions: 8Answers: 1
I would like to edit a cell of a DataTable by row index, which is a array that contains the rows that fired the select event. So far I edit just one row, by index 0:
dtMember.cell({row: indexes[0], column: COL_SELECT}).data(CHAR_UNSELECTED);
just removing [0]
is not working (Uncaught TypeError: c[0] is undefined. (jquery.dataTables.min.js:153:256))
This question has an accepted answers - jump to answer
Answers
cell()
doesn't take an object - try this instead:Colin
I tried:
dtMember.cell( indexes, COL_SELECT).data(CHAR_UNSELECTED);
still just in the first row the
CHAR_UNSELECTED
is set.indexes
contains all indexes whereasindexes[0]
contains just the first rowcell()
will only select a single cell. It sounds like you are wanting to edit multiple? I'm not sure - it is hard to say without a test case.Allan
I solved it so: