PDA

View Full Version : LockingGridView / Drag Drop



tdikarim
20 Apr 2011, 2:32 AM
Hi,

I have a EditorGridPanel that the store is populate via metadata.
3 columns are >> "locked": true,

I cannot drag and drop row from this 3 columns All other works fine

Also if I select a row from this 3 columns the row isn't hilighted
I must forgot something :-/

This is my grid definition:


var grid = new Ext.grid.EditorGridPanel({
id: 'TKdynamiqueGrid'
,stateId:'TKGrid-stateid'
,stateful: true
,isConfiguredByServer: false
,border:false
,width: 540
,height: 200
,store: store
,colModel: colModel
,selModel: new Ext.grid.RowSelectionModel({
singleSelect:false
})
,clicksToEdit: 2
,multiSelect: true
,enableColLock: true
,enableDragDrop: true
,ddGroup : 'TKdynamiqueGrid'
,ddText : 'Déplacer cette ligne.'
,loadMask: true
,trackMouseOver:true
//,disableSelection:false
,renderTo: Ext.getBody()
,loadMask: true
,tbar: [{
ref: '../ajouterBtn',
text: 'Ajouter',
tooltip: 'Ajouter une nouvelle ligne',
iconCls: 'icon-grid-add',
handler: function() {
Ext.TK_GhostMessage.msg('MESSAGE UTILISATEUR', ' ' + 'Click Ajouter', 5);
},
scope: this
},
{
ref: '../supprimerBtn',
text: 'Supprimer',
tooltip: 'Supprimer une ligne',
iconCls: 'icon-grid-remove',
handler: function() {
Ext.TK_GhostMessage.msg('MESSAGE UTILISATEUR', ' ' + 'Click Supprimer', 5);
},
scope: this
},
'->',
this.tb_dateField
]
,plugins: [filters]
,bbar: paging
,view: new Ext.ux.grid.LockingGridView()
,listeners: {
scope: this,
render: {
fn: function(){
console.log('Render - load');
store.baseParams = {"testdyn":'testdyn'};
store.load({
params: {
start: 0,
limit: parametresGridStock.nbRowParPage
}
});
}
}
,
viewready : {
fn: function(thegrid){
var grid = Ext.getCmp('TKdynamiqueGrid');
var dragProxy = grid.getView().columnDrag,
ddGroup = dragProxy.ddGroup;

droppable.addDDGroup(ddGroup);
}
}
}

});



Thanks for your help