Scrolls to top of the DataTable's body when table gets the focus on scroll down and clicking on row

Scrolls to top of the DataTable's body when table gets the focus on scroll down and clicking on row

srini_attulurisrini_attuluri Posts: 8Questions: 0Answers: 0
edited September 2012 in DataTables 1.9
Hi,
Actually, I am facing a problem with scrolling.
When I scroll down the table and select a row then it scrolls to top of the DataTable's body when table gets the focus.It works fine in firefox and chrome(as it does not scroll and staying at the same row) but not IE8.

Can you please help me out.

Here below is my DataTable initialization.


var tTable = $("#testTable").dataTable( {
"oLanguage" : {
"sSearch" : "",
"sZeroRecords" : "All records filtered out",
"sEmptyTable" : "No matching records found"
},
"bSortable" :true,
"bScrollCollapse" : true,
"bDeferRender" : true,
"bSort" : true,
"sDom" : '<"top">rt<"bottom"><"clear">',
"sScrollY" : "143px",
"bRetrieve" : true,
//"sPaginationType" : 'full_numbers',
"bAutoWidth" : true,
//"bPaginate" : true,
"iDisplayLength" : 200,
"bProcessing" : true,
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
$(nRow).attr("id",aData[0]+"-"+aData[1]);
return nRow;
},
"aoColumns": [
{ "sTitle": "Resource Name"},
{ "sTitle": "Permission Name"}
]
});

Replies

  • srini_attulurisrini_attuluri Posts: 8Questions: 0Answers: 0
    I am handling the click event like below
    $("#example tbody tr").live("click",function(){


    //alert("hai");
    $("#example").focus();
    // Here I am doing with navigation through the table with up / down arrows

    });
This discussion has been closed.