KoolReport's Forum

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

Column selection #1826

Closed Epitello opened this topic on on Jan 7, 2021 - 2 comments

Epitello commented on Jan 7, 2021

Hi, I would like to select a column of datatable on click, do you implement any solution for this ? thanks by advance

Sebastian Morales commented on Jan 8, 2021

Just add your event listener for mouse click on a column and use DataTables' column select function:

https://datatables.net/reference/api/columns().select()

The DataTables' client object name is the name you use when create the widget:

<?php
    DataTables::create(array(
        "name" => "myTable",
        ...
    ));
?>
<script>
    KoolReport.load.onDone(function() {
        myTable.columns([0, 1]).select(); //select the first and second columns
    });
</script>
Epitello commented on Jan 11, 2021

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
help needed
solved

DataGrid