View Full Version : Ext.grid.AbstractSelectionModel is an incomplete interface

21 Jul 2010, 11:26 AM
I was seeking to create a selection model for an EditorGridPanel that combined the functionality of the CellSelectionModel and the RowSelectionModel. That is, when the grid is in "edit mode", it would act like the classic EditorGridPanel, and when the grid is in "view mode" it would act like a GridPanel. This is so I can use the grid both as an editor, and a multi-select list, based on what the user wants to do.

I went about "implementing" the AbstractSelectionModel to let the Cell/Row models share control of the grid without having to destroy the grid each time the model switches. In my testing, I found at least one function in the SelectionModels (onEditorKey) that was being invoked which was not part of the interface.

This is not a huge deal per se, but it would be helpful to have the interface include a complete signature.

On a related note, a grid function like setSelectionModel() seems like it would fairly simple to implement. The only issue with the current SelectionModels is that they do not clean up their listeners, and release their selections in destroy(). Anyways, it's an idea.

Kudos for writing an extensible framework, as usual =D>