KoolReport's Forum

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

Table with Row Group in dashboard #3177

Open John opened this topic on on Oct 22, 2023 - 2 comments

John commented on Oct 22, 2023

I can not find how to implement row group (and rowspan) in a table when using Dashboard. I read this article: https://www.koolreport.com/docs/koolphp/table/#row-group but in dashboard how can i do it?

Sebastian Morales commented on Oct 23, 2023

I think the Dashboard's Table widget hasn't had row grouping yet, not like the Table or DataTables one in KoolReport Pro. So far you would need to use KWidget in Dashboard to get row grouping:

class CoreTableDemo extends KWidget
{
    protected function dataSource()
    {
        ...
    }

    protected function onCreated()
    {
        $this
        ->use(\koolreport\widgets\koolphp\Table::class)
        ->settings([
            // set "columns", "options", "grouping" of Table widget here: https://www.koolreport.com/docs/koolphp/table/#row-group
        ]);
    }
} 

or:

class DataTablesDemo extends KWidget
{
    protected function dataSource()
    {
        ...
    }

    protected function onCreated()
    {
        $this
        ->use(\koolreport\datagrid\DataTables::class)
        ->settings([
            // set "columns", "options", "clientRowGroup" of DataTables widget here: https://www.koolreport.com/docs/datagrid/datatables/#clientrowgroup-(version-%3E=-5.0.0)
        ]);
    }
} 
John commented on Oct 23, 2023

Thanks i thought this about Kwidget too, so you confirmed i'm on the right way. I'll try it, thanks again.

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

Dashboard