Forum


00:20

30/05/2009

Hi,
I have been able to get the new drag and drop to work visually, but I want to change a value when a row is dropped.
i.e. I have 3 grids, representing 3 groups of people. Each row has a name and group id, retrieved from a database. When I drag one row to another grid, I would like the group id to update with that grid id.
How can I accomplish this? Do I use the “ondrop” event?
Also, the values in the row sometimes go blank after dropping.
(Sorry - I just realized I posted this in the wrong forum.... moving now)
08:43

Moderators
30/10/2007

Hello,
Read this docs. You can do this.
http://www.trirand.com/jqgridw.....ween_grids
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
19:04

Moderators
30/10/2007

Hello,
Here is some exmple. Also I have added some other things into the docs.
Actually you can use the beforedrop event.
Here is a little example from my project:
$("#grid1").jqGrid('gridDnD',{
connectWith:"#grid2",
autoid : function(data){ return data.newid; },
dropbyname:true,
beforedrop : function(e,ui,data,source,target) {
// data is the data to be inserted into the targed
// do something here and return the new data. Also I use drop by name here
return mynewdata;
}
});
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
64 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66