Select row in second page

Select row in second page

gerennegerenne Posts: 30Questions: 0Answers: 0
edited May 2012 in DataTables 1.9
Hi !!

I have a table with more of one page, when I add a row or update, I select the row that with I'm working, in the case to add row:

var nNodes = oTable.fnGetNodes().length;
var row=nNodes-1;
$('#table tbody tr:eq('+row+')').click();

When is a change:
nPos = oTable.fnGetPosition( this );
$('#table tbody tr:eq('+nPos+')').addClass('row_selected');

This work fine, but the problem is that when the row is added in second or more page, the event don't work.

Thanks in advance.

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Top FAQ: http://datatables.net/faqs#events :-)

    Allan
  • gerennegerenne Posts: 30Questions: 0Answers: 0
    Hi Allan,

    Thanks!! now It's working!!!!

    Could it's possible?, change the page , I explain me... If I change page, select a row and update, when the table have been reloaded, the table came back at first page, and I want to the page to be the same that when I've reloaded.

    Thanks in advance!!
  • gerennegerenne Posts: 30Questions: 0Answers: 0
    Ok, I solved this problem, I've used:

    "iDisplayStart": X,

    Thanks again!!
This discussion has been closed.