tags:

views:

1093

answers:

1

Hi I've just noticed that my extJS grid,which uses a CheckboxSelectionModel, actually shows two checkboxes in the left most column. If I make the column wider, I can see it. The extra checkbox becomes checked when I tick a row. This also happens in the built in demos and everywhere an extjs grid uses a checkboxselection model. I'm not sure if this was always the case, something new or just an issue with my system. Has anyone ran into this before? Do you know if that's ok and what was the reasoning behind putting an extra checkbox there?

Thanks Harel

A: 

Can you confirm that the first checkbox is actually really a checkbox and not an image representing a checkbox?

I don't know for sure but it might be possible that the second checkbox you see is actually the real checkbox and the first one is a checkbox image that is being used to keep checkboxes consistent across browsers. I know there have been Ext extensions that do this, don't know if it is part of the Ext library itself. Normally the second checkbox should be hidden by css.

You can easily check this by inspecting the DOM with firebug.

Edit: I just checked out the examples and apparently what i said appears to be the case, the checkboxgrid uses a css sprite with 2 different states in 1 image (this image). So if you expand the column with the checkboxes both parts of the sprite show and you indeed see 2 checkboxes.

Mind you that they are no actual checkboxes but divs with a checkbox image and a click event.

ChrisR
Thanks Chris! it apears to be the case. I'll look into why its not being hidden by css.
Harel