fnGetSelectedData applied to visible only?

fnGetSelectedData applied to visible only?

hozthozt Posts: 45Questions: 0Answers: 0
edited March 2012 in TableTools
Hello,

Since the way TableTools 'multi row' selection is [ binded to table only ]* I decided it makes no sense to have two different type of selections, I am now using TTools selection, for my 'mass' actions. Such as 'Delete All'.

* I have managed to use the checkboxes in my action column to select and deselect through them, ignoring clicks on the row itself.
* Allan I think you should consider a feature like this. Outside 'selecting' - or not limited to row. Not what I came here for anyway!

I managed to do it (the Delete All ie) with with no problem with the API function: fnGetSelectedData

But I need something else, I couldn't find it in the API but is there a way to get the visible data only?
I know the plugin itself has access and can gather only those rows, since if we 'Select All' and filter after, he only copys to the clipboard what is visible, according to my definition.

But I would also like to apply actions only to the visible rows, some function like 'SelectedVisibleData' would be EPIC. Unless there is already a way.

Anyhow, I would appreciate anyone idea on how to do this. "Hacking" into the plugin if it has to be.

Thanks in advance.

Replies

  • hozthozt Posts: 45Questions: 0Answers: 0
    Any ideas? :D
  • hozthozt Posts: 45Questions: 0Answers: 0
    I've been trying to come up with solutions, but I think I've come across a bug somewhere.

    Allan, I just replied an old topic with a similar issue I found here ( http://datatables.net/forums/discussion/comment/32691#Comment_32691 )


    Although this isn't my preferred solution (preferred option in 1st post), I would be happy if it worked.
    I'm using this code
    [code]
    var oTT = TableTools.fnGetInstance('my_table');
    var rVis = oTable.fnGetDisplayNodes();
    for (var i=0; i
  • hozthozt Posts: 45Questions: 0Answers: 0
    I've been trying to come up with solutions, but I think I've come across a bug somewhere.

    Allan, I just replied an old topic with a similar issue I found here ( http://datatables.net/forums/discussion/comment/32691#Comment_32691 )


    Although this isn't my preferred solution (preferred option in 1st post), I would be happy if it worked.
    I'm using this code
    [code]
    var oTT = TableTools.fnGetInstance('my_table');
    var rVis = oTable.fnGetDisplayNodes();
    for (var i=0; i
  • hozthozt Posts: 45Questions: 0Answers: 0
    edited April 2012
    Jesus, too much time looking into this.
    Figured it out.

    The problem:
    $(rVis[i]).click() -> yes.
    oTT.fnDeselect ( rVis[i] ) -> no $ on rVis -.-

    Obviously, although I'm only using the oTT.isSelected, since .click() is faster than selecting and deselecting through TableTools (apparently).


    EDIT:
    .click() Doesn't work on WebKit browsers. (Safari and Chrome).
    Back to fnSelect and fnDeselect :D
This discussion has been closed.