Topic: Table With Horizontal Scroll - Possible to fix a column?

cdenby pro asked 5 years ago That functionality is what I'm after, except that I'd like to have a column or two at the left with disabled horizontal scrolling. Basically, looking for Horizontal and Vertical Scrolling with a thead not scrollable and a left column not scrollable.

Is this possible?

itman free answered 4 years ago

Hi I'm looking for a solution to the same problem mentioned above and I tried TonyO solution but it didn't work. Is there another way?

Grzegorz Bujański staff commented 4 years ago

Unfortunately not. We don't know any other way.

cdenby pro answered 5 years ago

I ended up going with a jquery-freeze-table plug in from Nick Tsai


Marta Wierzbicka staff commented 5 years ago

Ok, I understand.

Marta Wierzbicka staff answered 5 years ago

Hi, cdenby,

have you checked TonyO's solution? Is it helpful for you?

Best, Marta

TonyO pro answered 5 years ago

To have fixed columns (or header rows) I've found adding this javascript helps provide additional scroll control:

$(document).ready(function() { var table = $('#example').DataTable( { scrollY: false,, scrollX: true, scrollCollapse: true, paging: false, fixedColumns: { leftColumns: 1, topRows: 1 } } ); } );

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.12
  • Device: PC
  • Browser: Chrome
  • OS: Win10
  • Provided sample code: No
  • Provided link: Yes