Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Darren Bowen on May 25, 2007 13:50
open dhtmlx forum
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.

   
Answer posted on May 25, 2007 18:02
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
Answer posted on May 25, 2007 18:03

Attachments (1)
Answer posted by Darren Bowen on May 30, 2007 10:58
Thanks, I can confirm that the revised version solves the issues I mentioned.
Answer posted by Andrei (Support) on Dec 10, 2014 21:26

I hope this information will be enough for you. But you also can have a look at combobox html and asp.net calender.