ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: NearEarthObject on July 15, 2019, 09:42:08 pm

Title: Cell Style Boolean icone
Post by: NearEarthObject on July 15, 2019, 09:42:08 pm
Hi !

Is there an easy way to substitute (for some cosmetics purpose) on Boolean column, the checkbox by green or red icone ?
And also keeping on backside the ability to click and toggle icone from false to true ?

Thanks :)
Title: Re: Cell Style Boolean icone
Post by: paramvir on July 17, 2019, 09:12:07 pm
That's possible, it would require following customization.

1. use column.render to display icons according to value.

2. use cellClick event to toggle cell value.
Title: Re: Cell Style Boolean icone
Post by: NearEarthObject on July 30, 2019, 03:52:40 pm
Hi, I really try to archive my goal, but at this point without any success.
Maybe an exemple would be great.

Thanks in advance

PS: I also precise that my colModel are generated by ajax request.
php fields who serve the base is the following one :
Code: [Select]
array(
            'title' => $this->l('Status'),
'width' => 50,
'dataIndx' => 'active',
            'align' => 'center',
'dataType' => 'bool',
'type' =>'checkbox',
'cls' => 'boolean',

'filter' => array(
'crules' => [array('condition'=> "equal")]
)
        )