Unanswered: How do you subclassAbstractStoreSelectionModel?
Unanswered: How do you subclassAbstractStoreSelectionModel?
could some one kindly give me an example of how to subclass AbstractStoreSelectionModel? The selection model in my gridpanel totally does not work, but I've read from the documentation that "DataBound UI widgets such as GridPanel, TreePanel, and ListView should subclass AbstractStoreSelectionModel and provide a way to binding to the component. The abstract methods onSelectChange and onLastFocusChanged should be implemented in these subclasses to update the UI widget."
I found it at this link: http://dwim.hu/static/hdws/libraries...on.Model.html# . I just noticed this is for 4.0-beta2. However, almost the same text is in my 4.0.3 extjs4 documentation: @ Ext.Selection.Model :
"Tracks what records are currently selected in a databound widget.
This is an abstract class and is not meant to be directly used.
DataBound UI widgets such as GridPanel, TreePanel, and ListView should subclass AbstractStoreSelectionModel and provide a way to binding to the component.
The abstract methods onSelectChange and onLastFocusChanged should be implemented in these subclasses to update the UI widget."
Please don't post unrelated questions in the same thread.
Unless you're trying to do something unusual you don't need to subclass Ext.model.Selection. Generally you'd just use one of the existing subclasses. See the Sub Classes link at the top of the docs:
Why doesn't grid.getView(), grid.getSelectionModel(), etc. work in a gridpanel?
They work fine, there must be a mistake in your code. It would be easier to help you if you posted a small code example of your problem. Make sure any code you post is surrounded with CODE tags (# button in the editor toolbar).