PDA

View Full Version : [CLOSED] Grouping grid Drag and Drop problem



manjunathub
6 Sep 2013, 2:15 AM
1st and last records of the grouping grid cannot be drag and dropped.

Assume there are 2groups A and B in a grid

Group A's last record cannot be moved to Group B's 1st position.
Group B's 1st record cannot be moved to Group A's last position.

However you can drag and drop the other records in Group A's or B 's records to any other position in both the groups.



*EDIT BY Gary Schlosberg
Test case: https://fiddle.sencha.com/#fiddle/hj
In 4.2, dragging between grid groups is not functioning. Load test case, try dragging from one group to another.

Gary Schlosberg
6 Sep 2013, 1:58 PM
Can you please provide a test case so that we can reproduce the problem and fix it? Thanks.

manjunathub
9 Sep 2013, 9:28 PM
Hi Gary,

Thanks for your reply, I am attaching a snap shot which may help you to understand the issue correctly.

45739

manjunathub
9 Sep 2013, 9:37 PM
<!DOCTYPE html>


<html>
<head>
<title>Project Builder - My Project</title>


<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all-gray.css" />
<script type="text/javascript" src="extjs/ext-all.js"></script>
<script type="text/javascript">
//process revision tree node click
/*global Ext:false */
Ext.onReady(function () {
var store = Ext.create('Ext.data.Store', {
storeId: 'employeeStore',
fields: ['name', 'seniority', 'department'],
groupField: 'department',
data: {
'employees': [{
"name": "Michael Scott",
"seniority": 7,
"department": "Group-1"
}, {
"name": "Dwight Schrute",
"seniority": 2,
"department": "Group-1"
}, {
"name": "Jim Halpert",
"seniority": 3,
"department": "Group-2"
}, {
"name": "Kevin Malone",
"seniority": 4,
"department": "Group-2"
}, {
"name": "Angela Martin",
"seniority": 5,
"department": "Group-2"
}]
},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'employees'
}
}
});


Ext.create('Ext.grid.Panel', {
title: 'Employees',
store: Ext.data.StoreManager.lookup('employeeStore'),
columns: [{
text: 'Name',
dataIndex: 'name'
}, {
text: 'Seniority',
dataIndex: 'seniority'
}],
features: [{
ftype: 'grouping'
}]
,viewConfig: {
plugins: {
ptype: 'gridviewdragdrop',
dragText: 'Drag and drop to reorganize'
}
},
width: 200,
height: 275,
renderTo: Ext.getBody()
});
});
</script>
</head>
<body>
<div id="loading-mask"></div>
<div id="loading">
</div>
</body>
</html>

Gary Schlosberg this sample may help you to understand my problem.

In the above example there are 2 groups for Department, higher officer has the rights to change the department of the employee based on the seniority or according to requirement. For changing the departments of an employee higher officer can drag and drop the employee to different department in the grid. How ever he wants to maintain the order of employee based on his requirement.

Now he wants to change the department of "Jim Halpert" from Group2 to Group1 and in last position. This is not happening now. However it is possible to do drag and drop for the last row(employee) to any other position but not in the next Group's 1st position or previous Groups last position.


Thanks and Regards,
Manjunath. U. B

Gary Schlosberg
10 Sep 2013, 3:26 PM
I see it now, but I'm not able to drag any records to another group at all. Are you? It seems like you would have to listen for the beforedrop event and update the 'department' before placing it in the new group.

manjunathub
10 Sep 2013, 9:35 PM
For me drag and drop is working fine. only thing is last or first rows of adjacent groups cannot be dropped to first and last positions.

manjunathub
11 Sep 2013, 9:44 PM
Hi Gary,

You can check this link http://jsfiddle.net/manjunathub/vjEMW/1/ where drag and drop is working.

Thanks and Regards,
Manjunath. U. B

Gary Schlosberg
12 Sep 2013, 9:08 AM
I see now. I was testing against 4.2.1. Using 4.1.1, I see the same behavior on your original code that you describe. Your fiddle doesn't seem to have drag/drop configured at all.

I would normally recommend using a newer version of ExtJS, but as I mentioned the drag drop wasn't working in 4.2.1. I am going to file a bug against that test case, and hopefully we can get dragdrop sorted for grouped grids.

manjunathub
12 Sep 2013, 9:26 AM
Thanks for considering it as a bug. But our application is using 4.1.1 version of extjs

Gary Schlosberg
12 Sep 2013, 10:11 AM
I don't know of a way to work around this issue with 4.1.1, but hopefully someone will post one.

Thanks for the report! I have opened a bug in our bug tracker.

manjunathub
15 Sep 2013, 10:00 PM
Once it is fixed in the 4.2 version i will try to fix in the 4.1.1 version... Thanks for giving your time....:)

IT100
8 Aug 2014, 4:26 PM
are these bugs getting fixed?

HTK
5 Mar 2015, 4:18 AM
This bug is still alive in version 4.2.3. For a product that costs minimum around $3000... nice job!

manjunathub
5 Mar 2015, 6:52 AM
Is it fixed in he current version.