JSFiddle - React, Tailwind, and code Playground
by Rambabu Pudi
HTML
<script src="http://dev.sencha.com/extjs/5.0.0/ext-all-debug.js"></script>
<link rel="stylesheet" href="http://dev.sencha.com/extjs/5.0.0/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all-debug.css">
<div id="panel"></div>
JavaScript
Ext.define('DataObject', {
extend: 'Ext.data.Model',
fields: ['name']
});
Ext.onReady(function(){
var measureData = [
{ name : "AVG COST"},
{ name : "AVGSELLINGPRICE"},
{ name : "BUDGETCOSTPLAN", draggable:false}
];
var productData = [
{ name : "SBU"},
{ name : "FAMILY"},
{ name : "SUBFAMILY"}
];
// create the data store
var measureGridStore = Ext.create('Ext.data.Store', {
model: 'DataObject',
data: measureData
});
// create the data store
var productGridStore = Ext.create('Ext.data.Store', {
model: 'DataObject',
data: productData
});
// Column Model shortcut array
var columns = [
{text: "Measure Name", flex: 1, sortable: true, dataIndex: 'name'}
];
// declare the source Grid
var measureGrid = Ext.create('Ext.grid.Panel', {
hideHeaders:true,
viewConfig: {
copy : true,
plugins: {
ptype: 'gridviewdragdrop',
dragGroup: 'measureDDGroup',
dropGroup: 'secondGridDDGroup'
},
listeners: {
drop: function(node, data, dropRec, dropPosition) {
}
}
},
store : measureGridStore,
columns : columns,
stripeRows : true,
title : 'Measures',
margins : '0 2 0 0'
});
// declare the source Grid
var productGrid = Ext.create('Ext.grid.Panel', {
hideHeaders:true,
viewConfig: {
plugins: {
ptype: 'gridviewdragdrop',
// dragGroup: 'firstGridDDGroup',
// dropGroup: 'secondGridDDGroup'
},
listeners: {
drop: function(node, data, dropRec, dropPosition) {
}
}
},
store :...