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
editCell + afterSaveCell + move to next
20/07/2009
18:27
Avatar
Romyn
Member
Members
Forum Posts: 45
Member Since:
13/06/2009
sp_UserOfflineSmall Offline

Hi,

I have a couple of grids (both based on local arrays). When I add a new row to the first grid I populate the second with a numbers of rows of which one column is blank. I then use a editCell call to take the user to the first row in the second grid to enter a value.

$("#grid_2").editCell("0", "2", true,true);

That works fine.

What I want to do, and the bit I'm having trouble with, is that when the user has entered a value I want to move them down to edit the cell below (same col, row+1) and carry on doing this until they've done so for all rows.

I'm trying to do this in the afterSaveCell function - but it doesn't work. While I thought this might be due to some issue of how I add 1 to the row it doesn't work either if I do it this way...

afterSaveCell: function (rowid,name,val,iRow,iCol){
                $("#grid_2").editCell("1", "2", true,true);
                }

Any ideas as to what I'm doing wrong?

Thanks

Romyn

22/07/2009
01:12
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Try this:

afterSaveCell: function (rowid,name,val,iRow,iCol){
                setTimeout( function() { $(”#grid_2″).editCell(”1″, “2″, true,true);},50)
                }

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.

22/07/2009
03:41
Avatar
Romyn
Member
Members
Forum Posts: 45
Member Since:
13/06/2009
sp_UserOfflineSmall Offline

Thanks Tony - that seems to have done the trick Smile

Regards

Romyn

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
61 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