KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

DataTable overflow #3171

Open Adolfo Alonso opened this topic on on Oct 16, 2023 - 2 comments

Adolfo Alonso commented on Oct 16, 2023

Hello, Can anyone tell me how to stop a DataTable overflow to the right?

Sebastian Morales commented on Oct 17, 2023

If your DataTables has many columns with long column names one solution is to render it inside a <div> tag with css style max-width is either fixed or 90%, 100% relative and overflow-x is scroll:

<div style="max-width: 1024px; overflow-x: scroll;">
    <?php DataTables::create(...); ?>
</div>

When the table is too wide, a horizontal scroll bar will appear allowing users to see the rest of the table without overflowing the page.

Adolfo Alonso commented on Oct 17, 2023

Thanks!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
solved

DataGrid