0

I have RowEdit in my view. I would like to able to call the controller so i can save the model.

My View

var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
    clicksToMoveEditor: 1,
    autoCancel: false,
    listeners: {
        afteredit: function () {
          // i want to call the controller from here
        }
    }
});

Ext.define('Pandora.view.MaterialsList', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.materialslist',
    store: 'Materials',
    title: 'Materials',
    plugins: [rowEditing]
}

I appreciate i may be going about this the wrong way and should be trying to catch this event in my controller but I have been unable to catch the event in my controller.

1 Answer 1

3

According to the docs, the event you want is edit not afteredit. Try listening to that in your controller.

In case you still want to be able to do what you've asked:

In one of your controllers, in the init code, you will need to assign the application to a global variable. APP = this.application

Then, anywhere in your application, you can say APP.getController('myController').myMethod()

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.