Ext.grid.EditorGridPanel + checkboxes + drag and drop
Hi,
i have a Ext.grid.EditorGridPanel which contains some columns and also colums with checkboxes. Now i want do enable drag and drop functionality for single rows. The drag and drop functionality works, but as soon as i enable the "enableDragDrop" functionality in my EditorGridPanel my checkboxes aren't working any more. They show up, but when i click on them, they don't change the value. I would really appreciate any help.
A sample CheckBox:
Code:
var showInGridViewColumn = new Ext.grid.CheckColumn({
header: t("dataLoggerColumnDefinitionShowInGridView"),
dataIndex: "showInGridView",
width: 50
});
And this is how my EditorGridPanel looks like:
Code:
this.grid = new Ext.grid.EditorGridPanel({
frame: false,
enableDragDrop: true,
ddGroup:'columnDefinitionDragAndDrop',
autoScroll: true,
store: this.store,
columns : typesColumns,
selModel: new Ext.grid.RowSelectionModel({singleSelect:true}),
trackMouseOver: true,
columnLines: true,
plugins: [showInGridViewColumn,hideInGridViewColumn,showInExport],
stripeRows: true,
tbar: [
{
text: t('add'),
handler: this.onAdd.bind(this),
iconCls: "pimcore_icon_add"
},
"->",
{
text: t('dataLoggerColumnDefinitionWarning'),
iconCls: "dataLoggerColumnDefinitionWarning",
xtype: "tbtext"
}
],
viewConfig: {
forceFit: true
},
listeners: {
'render': {
scope: this,
fn: function(grid) {
var ddrow = new Ext.dd.DropTarget(grid.container, {
ddGroup : 'columnDefinitionDragAndDrop',
copy:false,
notifyDrop : function(dd, e, data){
var ds = grid.store;
var sm = grid.getSelectionModel();
var rows = sm.getSelections();
if(dd.getDragData(e)) {
var cindex=dd.getDragData(e).rowIndex;
if(typeof(cindex) != "undefined") {
for(i = 0; i < rows.length; i++) {
ds.remove(ds.getById(rows[i].id));
}
ds.insert(cindex,data.selections);
sm.clearSelections();
}
}
}
});
}
}
}
});