Page 9 of 15 FirstFirst ... 7891011 ... LastLast
Results 81 to 90 of 146

Thread: [SOLVED]Grid Drag and Drop reorder rows

  1. #81

    Default afterrowmove event is not firing

    I have used the plugin. I am able to display the rows and drag drop works great. but afterrowmove event is not getting fired in the below code. Can any one help me please.

    var win = new Ext.Window({
    closable:true, border:false, plain:true,height:500,
    items:[{
    xtype: "grid",
    plugins: [new Ext.ux.dd.GridDragDropRowOrder({
    copy: false, // false by default
    scrollable: true, // enable scrolling support (default is false)
    //targetCfg:{},
    listeners:{

    afterrowmove:function(objThis,oldIndex,newIndex,records){
    alert("afterrowmove");
    }

    }

    })],
    store:ds,
    cm:columnModel,
    selModel:new Ext.grid.RowSelectionModel({singleSelect:false}),
    height:500



    }]
    });
    win.show();

  2. #82
    Sencha User
    Join Date
    Jun 2008
    Posts
    8

    Default events not fired

    all events not fire. not only afterrowmove .

  3. #83
    Sencha User
    Join Date
    Jun 2008
    Posts
    8

    Default

    all works fine if you'll move next line:
    Code:
    Ext.ux.dd.GridDragDropRowOrder.superclass.constructor.call(this);
    after
    Code:
    this.addEvents(
            {
                beforerowmove: true,
                afterrowmove: true,
                beforerowcopy: true,
                afterrowcopy: true
            });

  4. #84
    Sencha User Lobos's Avatar
    Join Date
    Oct 2007
    Location
    Sao Paulo, Brazil
    Posts
    461

    Default

    Updated the first page with latest version.

  5. #85
    Ext User
    Join Date
    Jul 2009
    Posts
    50

    Default

    Hi, I'm trying to use this plugin, but can't seem to get the events to fire..

    I've placed the plugin in a grouping grid, so I have set view: new Ext.grid.GroupingView().. Don't know if thats the problem or I'm doing something else wrong..

    Code snippet:
    Code:
                            
                            //Drag drop config
                            plugins: [new Ext.ux.dd.GridDragDropRowOrder({
                                scrollable: true,
                                //targetCfg: { ... }, // any properties to apply to the actual DropTarget
                                listeners: {
                                    afterrowmove: function(para1,para2,para3) {
                                        console.log(para1,para2,para3)
                                    },
                                    beforerowmove: function(para1,para2,para3) {
                                        console.log(para1,para2,para3)
                                    },
                                    beforerowcopy: function(para1,para2,para3) {
                                        console.log(para1,para2,para3)
                                    },
                                    afterrowcopy: function(para1,para2,para3) {
                                        console.log(para1,para2,para3)
                                    }
                                }
                            })]

  6. #86
    Ext User
    Join Date
    Jul 2009
    Posts
    50

    Default

    Is this really the best way to do it?

    Code:
                            
                            //Drag drop config
                            plugins: [new Ext.ux.dd.GridDragDropRowOrder({
                                scrollable: true,
                                targetCfg: {
                                    
                                }
                            })],
                            listeners: {
                                render: function() {
                                    Ext.getCmp('linkboxlistgrid').plugins[0].on('afterrowmove',function() {
                                        console.log('test')
                                    })
                                }
                            }

  7. #87
    Sencha User
    Join Date
    Jun 2008
    Posts
    8

    Default

    Quote Originally Posted by karga View Post
    Hi, I'm trying to use this plugin, but can't seem to get the events to fire..
    ....
    hi, read my message at 08-25-2009 05:33 PM. after this changes plugin will fire events.

  8. #88
    Ext User
    Join Date
    Jul 2009
    Posts
    50

    Default

    Does anyone know how to lock this plugin to groups? The returned index (third parameter in beforerowmove) is by all the rows in the grid..

    Another solution would be to get some additional info off the grid, from that index.. Is there a function to return a record from the index?

    jamiro: Don't know if that worked.. I have added the listeners the normal way in 3 different places, with no result..

  9. #89
    Sencha User
    Join Date
    Jun 2008
    Posts
    8

    Default

    i mean, what after changes constuctor should look like that:
    Code:
    ...
    constructor : function(config)
        {
            if (config)
                Ext.apply(this, config);
    
            this.addEvents(
            {
                beforerowmove: true,
                afterrowmove: true,
                beforerowcopy: true,
                afterrowcopy: true
            });
            Ext.ux.dd.GridDragDropRowOrder.superclass.constructor.call(this);
        },
    ...
    after this changes plugins was work (in my case) - plugin start fire events.
    it's changes for current plugin version , posted by Lobos at first page code.

  10. #90

    Default Thank you

    Just a quick note to say a huge thank you to all involved in this plugin. It worked beautifully without a single change.

    THANK YOU
    THANK YOU


Page 9 of 15 FirstFirst ... 7891011 ... LastLast

Posting Permissions

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