var anSelected = fnGetSelected( oTable ) not executing

var anSelected = fnGetSelected( oTable ) not executing

Shahid266Shahid266 Posts: 2Questions: 0Answers: 0
edited June 2012 in General
var oTable = $('#posGridView').dataTable( {
"bPaginate": false,
"bFilter": false,
"bSort": false,
"bInfo": false,
"oLanguage": {
"sZeroRecords": "",
"sEmptyTable": ""
}

} );


$("#posGridView tbody").click(function(event) {
$(oTable.fnSettings().aoData).each(function (){
$(this.nTr).removeClass('row_selected');
});
$(event.target.parentNode).addClass('row_selected');
});

The above code working fine, when I select row , it highlight. But when I Press Delete Button , selected row not deleting.

$('#delete').click( function() {
var anSelected = fnGetSelected( oTable );
oTable.fnDeleteRow( anSelected[0] );
} );
When I put an alert(anSelected), I come to know that the statement var anSelected = fnGetSelected( oTable ); not executing.

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    What is fnGetSelected? Is to the TableTools API method, or something else? Have you tried using Visual Event to make sure the delete element has the event handler on it?

    Allan
This discussion has been closed.