Forum


19:32

18/07/2008

Hello. A long time without posting on the forum. I have a problem using new functionality of drag and drop between grids. I have 2 grids on my page. Everything seems to works fine until i call getDataIDs method.
If I drag a row from the first grid to the second one, it moves like it should. But when i call getDataIDs method (on the target grid) i get the following result (showing with alert for debug): dnd_107,3104,3118 . 3104 and 3118 where ids of rows that already were in the second grid at the start of the page. dnd_107 was the row that i drag from the first grid and drop into the second. The real id of that row was a number like the others. Do anybody knows why is this happening?
Thank you.
09:43

18/07/2008

Well, i solved the problem.
I'll post the solution here for anyone having the same problem. When you activate drag and drop on the grid, there are some options that manage the way the grid will give id's for rows. Theses options are autoid and autoidprefix. The solution is to turn off the autoid option by passing as argument the name of a function that will return the id of the row (autoid: myFunction). The problem is that the only parameters that you'll have on this function are the colums that you have on your grid. That is, you'll have to put the id of the row as a column of the grid too in order to keep the same id of the row on the second (or third...) grid.
I hope this could help somebody.
Most Users Ever Online: 715
Currently Online:
74 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