Select row in second page
Select row in second page
gerenne
Posts: 30Questions: 0Answers: 0
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.
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.
This discussion has been closed.
Replies
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!!
"iDisplayStart": X,
Thanks again!!