Connect with me

Latest Tweets

Ext Grid to Grid DNG

Posted on by admin


hello,

I was searching for the Grid to Grid Drag and Drop on particular row of the grid so that i can change the information on drag node on respect of dropped row of another Grid.. i was left helpless … then i researched and did a long hide and trail and finally got the solution on how to do it..

so i am here to share the solution to all of you ….

this.on(‘render’,function(){
var t = this.getView();
var ddrow = new Ext.dd.DropTarget(this.getView().mainBody , {

ddGroup : ‘dropOver’,
copy:false,
notifyDrop : function(dd, e, data){
var sel = Ext.getCmp(‘individualSearchGrid’).getSelections();
var s = Ext.getCmp(‘companySearchGrid’);

var compId = t.ds.getAt(t._flyweight.dom.rowIndex).data.compId;

var checkedIndId =”";
var extra = “”;
var checkedIndGrid = [];
var ckInd = “”;
for(var i = 0; i
checkedIndId += extra + sel[i].data.contactId ;
extra = “,”;
checkedIndGrid[i] = sel[i];
}
extra = “”;
for(var i =0;i
ckInd += extra + sel[i].data.title;
extra = “,”;
}

Ext.Msg.show({
title:’Save Changes’,
msg: ‘You are about to change the individual/s company . Would you like to save your changes?’,
buttons: Ext.Msg.YESNOCANCEL,
fn: function(btn){
if(btn == “yes”){
Ext.Ajax.request({
url:’CoreModule/xhr’,
method:’post’,
url: UrlConfig.xhr,
params:{file:’xhr/IndividualProcess.php’,
action:’updateCompanyCode’,
companyid:compId,//node.attributes.compId,
txtcontactid:checkedIndId
},
success:function(req){

for(var i =0;i

var grid = Ext.getCmp(“individualSearchGrid”);
var store = grid.getStore();
var selRec = grid.getSelectionModel().getSelections();
for(var i = 0; i < selRec.length; i++)
store.remove(selRec[i]);

}
// alert(req.response.Text);
Ext.MessageBox.alert(“Drag Drop Successfull”,
“You Have Successfully Changed The Selected Invidual’s(“+ ckInd +”) Company”);
return true;

},
failure:function(req){
alert(‘Failure’);
}
});
}

},
animEl: ‘elId’,
icon: Ext.MessageBox.QUESTION
});

}
});
},this);

PS. if you have any question regarding this you can always comment on this for the reply..

regards

ExtJS, Ajax, PHP


[[[JavaScript ]]]is really rocking

Share
[del.icio.us] [Digg] [dzone] [Facebook] [Friendsite] [Google] [LinkedIn] [MySpace] [Twitter] [Windows Live] [Yahoo!] [Email]

      


2 Responses to Ext Grid to Grid DNG

  1. am trying to subscribe to the RSS feed of your site but am unable to do so. Is it broken or is it my settings. i am using firefox inbuilt rs subscriver

  2. admin says:

    rss is working fine … may u have problem in ur site

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


What is difference between managed and backing beans?

Although general convention is to use one Managed beans per JSF page/fragment, but managed beans can be used with multiple pages.  But Backing Bean can be only used for single page/fragment. Normally, Managed Bean is desired to have Pageflow scope, … Continue reading