Author Topic: Cell Style Boolean icone  (Read 2436 times)

NearEarthObject

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 30
    • View Profile
Cell Style Boolean icone
« 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 :)

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Cell Style Boolean icone
« Reply #1 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.

NearEarthObject

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Cell Style Boolean icone
« Reply #2 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")]
)
        )
« Last Edit: July 30, 2019, 04:30:24 pm by NearEarthObject »