fnDeleteRow bug DT_index?

fnDeleteRow bug DT_index?

MadibaMadiba Posts: 6Questions: 0Answers: 0
edited March 2013 in General
Hi.

I'm doing a loop with a fnDeleteRow
[code]
for (var key in deleteData)
{
var dt_index = deleteData[key]; //
oTable.fnDeleteRow(dt_index);
}
[/code]

The problem is, if i have dt_index 100 (for example) and then delete index 101...it won't be delete (101) because after each fnDeleteRow index are updating so 101's index doesn't exists! It will be "converter" to 100 Am i missing something?

Replies

  • MadibaMadiba Posts: 6Questions: 0Answers: 0
    maybe the solution is sort the array with the indexes from large to small
  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    What are these indexes? Are they DataTables' indexes (i.e. those used internally), table indexes, or something else? Please link to a test case.

    Allan
  • MadibaMadiba Posts: 6Questions: 0Answers: 0
    edited April 2013
    They are DataTables' internal indexes

    My "solution" works

    I click in specific cell of a row to delete de row, so i save the internal index in array, then i click in another and the same...at the end i click a button to confirm delete those rows with a loop posted in my first post
This discussion has been closed.