PDA

View Full Version : Multiple CheckboxSelectionModels Issues



BRagland
9 Dec 2015, 3:54 PM
Hi,

I have a grid, and then a sub-grid (a grid inside the row of the main grid).

Inside that sub-grid I have another CheckboxSelectionModel to handle the row selections.

The problem is that whenever the user selects the main row from the top-level grid, the check-boxes are toggled to the checked state in the sub-grid, without the user ever checking or selection a row in the sub-grid. Those rows are not selected either, but the checkboxes are toggled to selected.

Very simple code:



me.selModel = new ext.grid.CheckboxSelectionModel({
hideable: false,
singleSelect: false,
moveEditorOnEnter: true
});


And here is the picture:
53731
NOTE: Only the row with "CHESTNUT" is actually being selected by the user. What's the deal with the other rows?

tristan.lee
11 Dec 2015, 2:39 PM
You may need to dive in to how the parent selection model targets its children. However, in the case, a grid in the row body of a grid isn't something supported by the framework. Though it may appear to work to an extent, I would recommend against doing it.

BRagland
11 Dec 2015, 2:50 PM
You may need to dive in to how the parent selection model targets its children. However, in the case, a grid in the row body of a grid isn't something supported by the framework. Though it may appear to work to an extent, I would recommend against doing it.

Thanks Tristan for the reply.

I'm aware it's not supported by the framework, however I inherited the issue so it wasn't my choice to do it this way.

I have however decided to take out the CheckboxSelectionModel and instead use the RowSelectionModel without any faked checkboxes. It works fine, though it isn't as aesthetically pleasing as what was originally planned.

Thanks for the help!