Dependency of checkboxes

Hello,

i’ve a grid with the 4 columns types “edtxt,edtxt,ch,ch”.
If user is checked the checkbox in column 3 the checkbox in column 4 should be as disabled. If user uncheck the checkbox in column 3 the checkbox in column 4 should be enabled.
Q: How can i realize this?
BTW: ‘onCellChanged’ is not a solution if i will do the same with checkbox in column 4…
Why? If state of checkbox in c3 is changed the ‘onCellChanged’ event is fired. If i change the state of checkbox in c4 (setChecked(…)) the ‘onCellChanged’ event is fired and so i get a never ending loop.

Regards, Carsten

You can use “onCheck” event docs.dhtmlx.com/doku.php?id=dhtm … nt_oncheck

Hi Olga,

many thanks, that works. But maybe i found a little optical bug.
If i set the other checkbox with
{cb}.setDisabled(true);
the checkbox will be gray. That’s ok.
If then i set
{cb}.setChecked(false);
the checkbox will be unchecked BUT than the checkbox isn’t gray along.

Overview:
{cb}.setDisabled(true);
{cb}.setChecked(false);

==> litte bug

{cb}.setChecked(false);
{cb}.setDisabled(true);

==> is ok

Regards,Carsten

Unfortunately this is known issue. After calling setValue() method cell is re-rendered and it still becomes enabled. We haven’t fix for it now. As a work around you may call setDisabled() method after setValue() method.