1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    24
    Answers
    2
    Vote Rating
    1
    getbogged is on a distinguished road

      0  

    Default Answered: Find drag and drops original drag location

    Answered: Find drag and drops original drag location


    I have a grid panel that is dragging rows to another grid panel with

    Code:
    drop: function(node, data, dropRec, dropPosition, record) { console.log(node) ... etc }
    I need to get the originating panel id from the drag. I am sure it inside one of those but i have been looking and i can't seem to find this.

  2. See if this works for you. I realize it's just from GridA to GridA, but the drop event's params should work for a second destination grid, too, I believe.

    Code:
    Ext.create('Ext.data.Store', {
        storeId:'simpsonsStore',
        fields:['name'],
        data: [["Lisa"], ["Bart"], ["Homer"], ["Marge"]],
        proxy: {
            type: 'memory',
            reader: 'array'
        }
    });
    
    
    Ext.create('Ext.grid.Panel', {
        store: 'simpsonsStore',
        columns: [
            {header: 'Name',  dataIndex: 'name', flex: true}
        ],
        viewConfig: {
            plugins: {
                ptype: 'gridviewdragdrop',
                dragText: 'Drag and drop to reorganize'
            }
            , listeners: {
                drop: function(node, data, dropRec, dropPosition) {
                    console.log(data.view.ownerCt.id);
                }
            }
        },
        height: 200,
        width: 400,
        renderTo: Ext.getBody()
    });

  3. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,895
    Answers
    368
    Vote Rating
    176
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      1  

    Default


    See if this works for you. I realize it's just from GridA to GridA, but the drop event's params should work for a second destination grid, too, I believe.

    Code:
    Ext.create('Ext.data.Store', {
        storeId:'simpsonsStore',
        fields:['name'],
        data: [["Lisa"], ["Bart"], ["Homer"], ["Marge"]],
        proxy: {
            type: 'memory',
            reader: 'array'
        }
    });
    
    
    Ext.create('Ext.grid.Panel', {
        store: 'simpsonsStore',
        columns: [
            {header: 'Name',  dataIndex: 'name', flex: true}
        ],
        viewConfig: {
            plugins: {
                ptype: 'gridviewdragdrop',
                dragText: 'Drag and drop to reorganize'
            }
            , listeners: {
                drop: function(node, data, dropRec, dropPosition) {
                    console.log(data.view.ownerCt.id);
                }
            }
        },
        height: 200,
        width: 400,
        renderTo: Ext.getBody()
    });

  4. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    24
    Answers
    2
    Vote Rating
    1
    getbogged is on a distinguished road

      0  

    Default


    yep, thats it. Thank you!

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."