Results 1 to 5 of 5

Thread: Ext.grid.plugin.RowEditing - Canceledit - cant get it to work

  1. #1
    Sencha User mkariti's Avatar
    Join Date
    Aug 2011
    Posts
    92

    Default Ext.grid.plugin.RowEditing - Canceledit - cant get it to work

    Hi there,
    Been trying to activate the cancel edit event but I cant seems to get it right.
    Does anyone have any ideas on how to do that???
    I was more successful with all other event such as beforeedit and edit.
    Cheers
    mkariti

  2. #2

    Default Re:

    It seems that you capture the canceledit event from the grid panel. If so, you can not capture it because this event is fired by the RowEditing plugin and it is not relayed to the grid panel while the other events (edit, beforeedit) are relayed. I don't know why.

    To capture and process the canceledit event of the plugin, you can use one of following methods:

    1. Using plugin's listeners when creating the plugin for the gridpanel:
    Code:
    ....
    plugins: [        
            Ext.create('Ext.grid.plugin.RowEditing', {
                    clicksToEdit: 1,
                    listeners: {
                            canceledit: function(editor, event, eOpts){
                                    // codes here
                            }
                    }
            })
    ],
    ....
    2. extend the Ext.grid.plugin.RowEditing class and relays the canceledit event to the grid panel:
    Code:
    Ext.define('Ext.ux.grid.plugin.RowEditing',{
            extend: 'Ext.grid.plugin.RowEditing',
            init: function(grid){
                    var me = this;
                    me.callParent(arguments);
                    grid.relayEvents(me, ['canceledit']);
            }
    });
    Then, using this extending plugin instead of the origin. This way, you can capture the 'canceledit' event from the grid panel component.

    Hope this help you in someway.

  3. #3
    Sencha User mkariti's Avatar
    Join Date
    Aug 2011
    Posts
    92

    Default

    Hi justmyhobby,
    Many thanks for your reply.
    The first option, while its a straight forward one, I cant seems to get it to work and as for the second option Im not sure how to I apply it in the code.
    Cheers
    mkariti

  4. #4

    Default Re:

    Hi mkariti,

    I think you should post your code here then the others can help you. I myself did not have problem with both methods that I have mentioned.

  5. #5
    Sencha Premium Member
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    53

    Thumbs up Fixed!

    Hi!

    I had the same issue and found this thread on Google. There is a bug in Ext 4.0.2a where this event is not fired by the RowEditingPlugin . I just upgraded to Ext 4.0.7 where this is fixed!

    Hope this helps someone.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •