KoolReport's Forum

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

Hide some columns #1006

Open Eugene opened this topic on on Jul 23, 2019 - 2 comments

Eugene commented on Jul 23, 2019

Hi,

is it possible to hide a column depends on some conditions

so how to get something like that

"quantity" => array(
                "label" => "Quantity",
                "type" => "string",
                "hide"=> function(){
                            if ($condition){
                                return true}                        
                            } else{
                                return false;}
                            }
                ),
Eugene commented on Jul 23, 2019

I found this solution.. not sure is it the best one but it works

$excluded_columns= (condition)? array("input") : array();

...
 Table::create(array(
        "excludedColumns"=>$excluded_columns,
KoolReport commented on Jul 24, 2019

Yes it is good solution

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
None yet

None