Forum


22:10

14/04/2011

Hi all,
I have a jqgrid which has celledit enabled and a save button on my toolbar. Currently users have to enter a value in the field (in the grid) and then press enter before they can hit save. Failing to do so, instead of the value entered in the grid cell, the HTML code is being submitted(default behaviour of cell edit - confirm by hitting enter or cancel by hitting escape).
Can I change this behaviour to submit the cell even if the user does not hit enter key. The moment user hits the save button the currently edited cell needs to be confirmed and the value needs to be submitted.
I am using jqgrid 3.8
Thanks in advance
Sudheer
21:53

14/04/2011

Thanks for the suggestion, but saveRow works for inline editing, as far as I know, not for cell edit.
Anyways, I solved my problem. I am giving the approach here for others:
1. declare two global variables irow and icol
2. in beforeeditcell set them to the row and col that is passed into the function
3. in aftersavecell, set irow and icol to 0(this is is when the user presses enter after editing)
4. in the click function of the save button, if the row and col are not 0 call the savecell using the irow and icol.
Thanks
Sudheer
Most Users Ever Online: 715
Currently Online:
68 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