Problems with advanced checkbox

Hi, I have been having a few issues with the advanced checkbox excell.


1. The checkbox does not take into account whether or not the grid is editable and so if you have grid editing disable you can still change the value of the checkbox.

This is easily fixed by adding  if (this.grid.isEditable){…} to the this.changeState  function.
 

2. For some reason when I populate a grid with a number of rows containing checkboxes some of them work fine and others cause the following javascript error when clicked:
    this.parentNode.obj has no
properties

There seems to be no systematic  reason as to which cells produce this error and which don’t (it’s different every time I load the grid).

Furthermore double clicking any of the checkboxes will cause the checkbox to start working without the aforementioned error.

I can’t seem to locate the problem, if I create a copy of the adv_checkbox exCell is there another method that I can try for the onClick event (instead of onclick=‘this.parentNode.obj.changeState()’) that might work?

Thanks.

   

Both problems confirmed and fixed, fixed code of eXcell attached.

1. The checkbox does not take into account whether
Your suggestion are correct, but it miss some other checks as well, which now correctly implemented.

some of them work fine and others cause the following javascript error when clicked:
I’m not sure about particular reason, but the existing code is potentially problematic, it is updated in attached file.

instead of onclick='this.parentNode.obj.changeState()'
The more safe way is to create new eXcell editor instance


Thanks, I can confirm that the revised version solves the issues I mentioned.