Topic: Table With Horizontal Scroll - Possible to fix a column?
https://mdbootstrap.com/docs/jquery/tables/scroll/#datatable-horizontal-scroll 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?
TonyO pro answered 6 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 } } ); } );
Marta Szymanska staff pro premium answered 6 years ago
cdenby pro answered 6 years ago
I ended up going with a jquery-freeze-table plug in from Nick Tsai
Thanks.
itman answered 5 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?
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: 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