PDA

View Full Version : Drag an drop



Poojabk09
23 Apr 2010, 3:32 AM
hi friends im pretty new to Extjs i hav a view port which has west an center the west part as tree an center has a empty grid i need to do drag an drop from tree to grid but when i drop it from tree it should add as column not as row plz can anyone help me ??? :)

jay@moduscreate.com
23 Apr 2010, 6:03 AM
then, you need to reconfigure the column model using the grid.reconfigure method

Poojabk09
25 Apr 2010, 8:46 PM
thanks a lot but can yu help me more very new to extjs just not understanding :(

Poojabk09
2 May 2010, 8:59 PM
Hi friends im able to add a column when i drag it from the tree node but my column header is not taking the tag of the node i mean if tree had a leaf called Name an when i drag ,it is adding as column but with default header not as Name ... any help will be appreciated thanks

this is the code an the parameter im passing in notifyDrop: function(dd, e, node) ...that node parameter as to be changed .. i wann the parameter which will tak that leaf name an add it as column plz any help ??



Ext.getCmp('gdView').dropZone = new Ext.dd.DropZone(Ext.getCmp('gdView').el, {
ddGroup: 'view-group',
notifyDrop: function(dd, e, node) {
alert(node.getValue);
for (var property in node)
{
node
//tree.getNodeById(taskID).attributes[property] = a.result.data[property];
}
var grid=Ext.getCmp('gdView');
var cm = grid.getColumnModel();
var curColConfig = cm.config;
curColConfig.push({
header: 'header -9',
width: 100,
dataIndex: 'somefield'
});
grid.reconfigure(grid.getStore(),cm);