SOLVED: select row and highlight with dblclick on second page

SOLVED: select row and highlight with dblclick on second page

dreamerdreamer Posts: 8Questions: 0Answers: 0
edited January 2011 in KeyTable
Hi all.
I'm barely new to this amazing tools and it was really easy to use the standards but now i stuck in a problem that i can't solve by my own and i didn't find anything in the forum so i hope you'll help me....

I'm using datatables 2.0 and my table renders with pagination enabled. When i dblclick any row on the first page the row is highlighted by css. But when i move to second..xx page the highlighting doesn't work.

Here's my code:
[code]
$(document).ready( function () {
$('#tablemarkup').dataTable( {
"bRetrieve": true,
"sPaginationType": "full_numbers",
"sDom": 'T<"clear spacer"><"H"lfrip>t<"F"lfrip><"clear spacer">T',
"oTableTools": {
"sSwfPath": "../TableTools2.0/swf/copy_cvs_xls_pdf.swf",
"fnDrawCallback": function () {
$('#tablemarkup tr').dblclick( function() {
if ( $(this).hasClass('row_selected') )
$(this).removeClass('row_selected');
else
$(this).addClass('row_selected');
} );
}
}
} );
} );
[/code]
Can anyone help me. Maybe with the fully correct code?

Thanks for your trouble in advance.

Replies

  • dreamerdreamer Posts: 8Questions: 0Answers: 0
    Noone can help?
  • dreamerdreamer Posts: 8Questions: 0Answers: 0
    To all who are interested....

    I've only added this part of code and that solved my problem:

    [code]
    $('#tablemarkup tr').live( 'dblclick', function () {
    if ( $(this).hasClass('row_selected') )
    $(this).removeClass('row_selected');
    else
    $(this).addClass('row_selected');
    } );
    [/code]
This discussion has been closed.