Fixed Column Width Not Working :/ — DataTables Forums

DataTables Advanced interactionfeatures for your tables. Editor Comprehensive editinglibrary for DataTables. Manual Download
  • Examples
  • Manual
  • Reference
  • Extensions
  • Plug-ins
  • Blog
  • Forums
    • Discussions
    • Sign In
  • Support
  • FAQs
  • Download
  • Purchase
Show site navigation Fixed column width not working :/ Fixed column width not working :/ tekuilatekuila Posts: 24Questions: 5Answers: 0 August 2019 in Free community support

Hello I've seen other working examples, but I tried a lot of things and still the fixed column width is not working on my table.

http://live.datatables.net/qadupaya/1/edit

Could someone give a quick hint? I know I haven't set width in this example linked to, but it's because I couldn't make it work.

Thank you - Jonas

Answers

  • sandysandy Posts: 913Questions: 0Answers: 236 August 2019

    Hi tekuila,

    You needed to include the fixedColumns scripts and styling in your HTML. You also need to define the fixedColumns property in your initialisation. In the example I have done the following.

    "fixedColumns": { leftColumns: 3, },

    I have linked the example here.

    This will mean that your custom styling will need some adjustment for the floating header.

    Hope this helps,

    Sandy

  • tekuilatekuila Posts: 24Questions: 5Answers: 0 August 2019

    Thanks! I tried to include fixedColumns etc, but didn't work.

    I found that adding CSS "table-layout: fixed;" to the table was the solution. :D

This discussion has been closed. Sign In · Register

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

Quick Links

  • Categories
  • Recent Discussions
  • Unanswered

Categories

  • 73.5K All Categories
  • 56 Priority support
  • 23.3K Free community support
  • 987 General
  • 13 Announcements
  • 2.5K DataTables
  • 37 DataTables 2
  • 1.3K DataTables 1.10
  • 91 DataTables 1.9
  • 35 DataTables 1.8
  • 9 CloudTables
  • 2.1K Editor
  • 2.8K Extensions
  • 20 AutoFill
  • 304 Buttons
  • 50 ColVis
  • 29 DateTime
  • 67 FixedColumns
  • 49 FixedHeader
  • 31 ColReorder
  • 28 KeyTable
  • 101 Responsive
  • 23 RowReorder
  • 40 Scroller
  • 162 SearchBuilder
  • 191 SearchPanes
  • 101 Select
  • 26 StateRestore
  • 22 TableTools
  • 212 Bug reports
  • 66 Feature requests
  • 97 Plug-ins
  • 11 Blog
  • 67 Web-site

DataTables

DataTables designed and created by SpryMedia Ltd. © 2007-2023 MIT licensed. Privacy policy. Supporters. SpryMedia Ltd is registered in Scotland, company no. SC456502.

Từ khóa » Html Table Fixed Column Width Not Working