Delete row, deselect row (TableTools) - Performance\Possible Bug Issue

Delete row, deselect row (TableTools) - Performance\Possible Bug Issue

hozthozt Posts: 45Questions: 0Answers: 0
edited May 2012 in DataTables 1.9
Hello,

I've had this fix for a while on something it's a "kind of" a bug, and I'm working on performance improvements.

So I'm using the multiple rows select (with fnPreRowSelect returning false, I'm activating the select only via a checkbox I have on every row) and I delete via a call to a JS Function.

Basically it's this:

[code]oTT.fnDeselect(nRow);
oTable.fnDeleteRow( nRow, null, true ); [/code]

I have to Deselect even though I know I'm going to delete it, I have to have it so that the TableTools doesn't get confused, and has options for like 'Deselect All' active when there are no rows in the table, and tries to export a row that doesn't exist.

I know it's possibly not a bug, since TableTools is a external plug-in, and doesn't care much for what we do directly to the table (deletering rows that are selected), so must I keep informing TableTools with the fnDeselect, or was TableTools suppose to detect it by it self?


It's eating a bit of performance having to deselect rows, I'm going to delete.

I had .click() on the check before, but it doesn't work on WebKit browsers, so that's no good, and still problematic to the performance.

On another note, I might even replace my checkboxes with images, to give a fake idea of a checkbox, because also, when I use my "deselect all" button, I have to go through each row and use jQuery find to find the checkbox and change the attr to false.
Is there anyone with an idea on that?


Thanks a million.

Replies

  • allanallan Posts: 61,821Questions: 1Answers: 10,127 Site admin
    I've run into this a few times myself in the past (indeed Editor does what you describe as well). What I think the fix should ultimately be is for DataTables to fire an event when it deletes a row, or multiple rows, and TableTools can hook into that.

    Added to my to-do list, but yes at the moment you need to tell TableTools.

    Allan
This discussion has been closed.