fnRowSelected sometimes doesnt fire.

fnRowSelected sometimes doesnt fire.

gloosemogloosemo Posts: 27Questions: 1Answers: 0
edited September 2011 in General
I'm using the datatable in conjunction with a JUI autocomplete sortable. Sometimes (only occasionally) if my focus is on the sortable and then i move over to select another row from the table, fnRowSelected doesnt fire. It's not often but it does happen. If i then give it a second click it will usually work. one time it took several clicks to get it to work, which seemed to have something to do with the cell being empty.

Anyways, i was considering a workaround like using mousedown to trigger the event handler, but i have no idea how to do this because fnRowSelected isnt in a normal event handler i could trigger (i think). any ideas as to how to address the problem.

This is my ini

[code]
var oTable = $('#example').dataTable( {
"sDom": 'R<"H"lfr>t<"F"ip<',
"bProcessing": true,
"sAjaxSource": '../ajax/getpersbase.php',
"aoColumns": [ { "sTitle": "Foodid", "bSortable": false, "bSearchable": false, "bVisible": false },
{ "sTitle": "Food", "bSortable": true },
{ "sTitle": "Type", "bSortable": true},
{ "sTitle": "Serving Amount (SA)", "bSortable": false },
{ "sTitle": "Serving Size (SS)", "bSortable": false },
{ "sTitle": "Cal", "bSearchable": false, },
{ "sTitle": "Fat", "bSearchable": false, },
{ "sTitle": "Sat", "bSearchable": false, },
{ "sTitle": "Trans", "bSearchable": false, },
{ "sTitle": "Chol", "bSearchable": false, },
{ "sTitle": "Sod", "bSearchable": false, },
{ "sTitle": "Carb", "bSearchable": false, },
{ "sTitle": "Fib", "bSearchable": false, },
{ "sTitle": "Sug", "bSearchable": false, },
{ "sTitle": "Pro", "bSearchable": false, },
{ "sTitle": "Comb", "bSearchable": false, "bVisible": false } ],
"bPaginate": true,
"sPaginationType": "full_numbers",
"bLengthChange": true,
"bFilter": true,
"bSort": true,
"aaSorting": [],
"bjQueryUI": true
});

//function tTools()
//{
var oTableTools = new TableTools( oTable, {
"sRowSelect": "single",
"sSelectedClass": "row_selected",
"fnRowSelected": function ( node ) {
var aData = oTable.fnGetData ( node );
addToCountertop ( aData );

}
});
[/code]
This discussion has been closed.