deselect row from outside the table

deselect row from outside the table

alexwebalexweb Posts: 4Questions: 0Answers: 0
edited October 2012 in DataTables 1.9
hello allan,

great plugin, quite elaborate implementation i might add !

so i have a rather specific requirement that im trying to accomplish

i have my table everything working perfectly i was able to fine-tune even the smallest detail but there is one thing i cant get my head around

the case
user selects a row by clicking on icon that resides inside each row, the data from this row is then added to a modal box outside the table.
The modal box has a "more" button that shows more info from the table and a "delete" button that clears the modal box from the entry and deselects the row in the table multiple rows can be selected.

the problem
when i have added / selected an item from one page of the table and i have moved to another page i cant remove the item from modal box by clicking the delete button mostly because in my implementation im looking for the item in the table and since only the items visible are present in the table it breaks.

the question
how can i deselect a row without it being present in the table at the time im trying to delete it / remove it from the modal box ?
or
Is it possible to have all the rows present in the table and have as visible ones only the ones from the current page ?

http://jsfiddle.net/ZP873/

thanks in advance
alex

Replies

  • allanallan Posts: 63,394Questions: 1Answers: 10,451 Site admin
    Have you tried using the $ method of DataTables? That allows an action to take place over multiple pages. I don't see your selection code int he link so I'm not 100% sure how it is working, but that's the most likely suggestion I have to fix the problem.

    Allan
  • alexwebalexweb Posts: 4Questions: 0Answers: 0
    yep
    var rows = oPlayersTable.$("tr.selected");

    did the trick
    thanks
This discussion has been closed.