Forum

July 12th, 2025
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
ajax validation while saving an inline edit
16/03/2011
01:19
Avatar
phazei
Member
Members
Forum Posts: 3
Member Since:
16/03/2011
sp_UserOfflineSmall Offline

It works fine for the edit form, but the form kind of kills the point of the grid.

I'm trying to get ajax validation to work with inline editing.  I don't want to validate each field one by one, I simply want to return a message from the server and allow the user to fix any errors and press enter again.  I can't figure out how to get it working quite right though.  I have a succesfunc that checks and returns false, and I have an errorfunc that can hide the overlay and display the error message.  

After the errorfunc call, I need to stop the restoreRow, so I set "this.grid = false" inside my errorfunc, so the inline form even stays there.  but then after the ajax call, the keydown binding used for enter and excape are unbound!  I can't figure out how to stop that :(

Does anyone have suggestions?

If it's not possible, it seems like it would only need 2-3 lines of code to easily allow for this functionality while maintaining backwards compatability.  

16/03/2011
01:38
Avatar
phazei
Member
Members
Forum Posts: 3
Member Since:
16/03/2011
sp_UserOfflineSmall Offline

I just noticed in the trunk:

https://github.com/tonytomov/jqGrid/blob/master/js/grid.inlinedit.js

There is a new variable "restoreAfterErorr" which defaults to true, and doesn't actually do anything yet… (and has a typo)

Is this going to take care of the issue, when will it be implemented, and is the trunk at all stable?

EDIT: Tried simply putting an if around the unbind, but as the ajax call is async, it goes off after the unbind...  So I simply moved unbind to after the restoreRow in some places and after the aftersavefunc calls.

16/05/2011
00:02
Avatar
kobruleht
Member
Members
Forum Posts: 144
Member Since:
05/05/2011
sp_UserOfflineSmall Offline

I posted about this issue in

/blog/?page_id=393/help/how-to-convert-search-string-to-where-clause-in-asp-net-mvc/#p23187

THis thread has link to stackoverflow where there was suggestion to return true always from onSuccess function to prevent kyboard binding loss. You may try this.

Have you found solution ?

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

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