in extjs 3 I use:
if (Model1.getSelectionModel().getSelections().length == 1 ) { record = Model1.store.getAt(Model1.getStore().indexOf(Model1.getSelectionModel().getSelected())) }, but in extjs4 it's not work ...
There is no getSelections()
method in ExtJS4. You need to use the getSelection()
.
In previous versions you had:
In ExtJS4, you have only getSelection()
which returns an array of the currently selected records. So you need to change your if statement. That should fix your problem.
extra note:
Use the getStore()
method to access the store rather than using the property name store
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With