Move horizontal scroll in FixedColumns

Move horizontal scroll in FixedColumns

Mathew_RockMathew_Rock Posts: 3Questions: 0Answers: 0
edited March 2014 in General
Hi all,
I create a datatable with FixedColumns and I want show last columns (move my horizontal scroll to rigth), Any idea???

This is my code:

[code]
var oTable = $('#list').find('table').dataTable( {
"sScrollX" : "100%",
"sScrollY" : "400",
"bAutoWidth" : false,
"bScrollCollapse" : true,
"bPaginate" : false,
"bSort" : false,
"sInfo" : "",
"sInfoEmpty" : "",
"bFilter": false,
"bInfo": false
} );
new FixedColumns( oTable, {
"iLeftColumns" : 2, //Freezed first for columns
"sHeightMatch" : "auto",
"iLeftWidth" : 250
} );
[/code]

Replies

  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin
    Just scroll with the mouse would you not? If you want to do it programmatically, use the standard `scrollLeft` property to set the scrolling position of the scrolling element.

    Allan
  • Mathew_RockMathew_Rock Posts: 3Questions: 0Answers: 0
    I want to do programmatically, but this doesn´t work [quote] scrollLeft [/quote] [code]oTable.scrollLeft(100); [/code]
  • Mathew_RockMathew_Rock Posts: 3Questions: 0Answers: 0
    The problem is with id, I fixed with this [code]$('div.dataTables_scrollBody').scrollLeft($('div.dataTables_scrollBody').width());
    [/code]
This discussion has been closed.