Topic: Table With Horizontal Scroll - Possible to fix a column?
cdenby pro asked 5 years ago
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?
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?
cdenby pro answered 5 years ago
I ended up going with a jquery-freeze-table plug in from Nick Tsai
Thanks.
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 } } ); } );
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- 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