سؤال

I've a tree-panel as

var t = new Ext.TreePanel({
    .
    .
    store: <loaded dynamically>
    viewConfig: {
        allowCopy: true,
        copy: true,
        plugins:{
            ptype: 'treeviewdragdrop',
            dragGroup: 'dragGroup',
            dragText: 'Place the node to grid'
        }
    }
});

And a grid-panel as

var bpMappingGrid = Ext.create('Ext.grid.Panel',{
    .
    .
    .
    .
    columns:[
    {
        header:'Application Name',
        dataIndex:'applicationName', //The same name should be there in treenode too
        align:'center',
        width:150
    },{
        header:'Tagged BusinessProcess',
        dataIndex:'businessProcessName', //The same name should be there in treenode too
        align:'center',
        width:180
    }
    ],
    store: <loaded dynamically>,
    viewConfig: {
        plugins:{
            ptype: 'gridviewdragdrop',
            dropGroup: 'dragGroup'
        }
    }
});

Every node has an associated businessProcessName and applicationName. So when we drag a node, it assigns the corresponding values of these data indices to the grid.

This code works fine in ExtJS 4.0 but its inserting an empty row in the grid in ExtJS 4.1. Please tell me how to make it working for ExtJS 4.1.

هل كانت مفيدة؟

المحلول

Make sure both the tree grid and regular grid have models defined that contain the fields: businessProcessName and applicationName.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top