Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Drag and drop - update row
31/12/2009
00:20
Avatar
finedesignz
Member
Members
Forum Posts: 12
Member Since:
30/05/2009
sp_UserOfflineSmall Offline

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)

06/01/2010
08:43
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

06/01/2010
18:18
Avatar
finedesignz
Member
Members
Forum Posts: 12
Member Since:
30/05/2009
sp_UserOfflineSmall Offline

Hi Tony,

I've read the docs several times.  They are thorough, but there is no example beyond connecting the grids. If you could give us an example of how to use the ondrop, that would be an excellent reference for others like myself.

Thanks!

07/01/2010
19:04
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

07/01/2010
20:26
Avatar
finedesignz
Member
Members
Forum Posts: 12
Member Since:
30/05/2009
sp_UserOfflineSmall Offline

Very helpful... Thank you!

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information