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_Related Related Topics sp_TopicIcon
returning false from beforeInitData() callback causes a bug
17/02/2012
19:55
Avatar
snobo
Member
Members
Forum Posts: 34
Member Since:
05/03/2009
sp_UserOfflineSmall Offline

Hi Tony,

lemme report a bug with beforeInitData() in 4.3.1. I will try to explain a somewhat tricky problem.

I'm doing a conditional check in beforeInitData() assigned to delete row event via navGrid method, returning true or false to allow or disallow deleting a record. Module jqModal.js is included, so normally before actual row deletion jqModal's alert box appears asking for confirmation. And if beforeInitData returns false, it doesn't appear. So far so good.

The problem only appears if beforeInitData returns false for the very first time after grid initializtion. In this case, next time when it does return true, an error in jqModal.js line #41 is thrown because the object H (and therefore h=H[s]) is empty. The source code here is quite hairy, so I don't exactly understand what's going on here, but I guess that normally it should refer to div#delmodgrid<gridID> - which, surprisingly, does exist at this point but somehow it's not in this object H.

I know that jsModal is not part of jqGrid but the problem here, I think, is not in the jsModal but in the order of initializing certain objects in grid.formedit.js... perhaps...

Once again, I'll explain the scenario.

If after page load and grid initialization you click on delete button and beforeInitData returns true (jqModal dialog appears asking for confirmation), everything will always be alright even if for some rows beforeInitData will return false.

But if right after page load and grid initialization you click on delete button and beforeInitData returns false (jqModal dialog does not appear then), then as soon as you click on a row for which beforeInitData returns true, you get an error.

This problem is only related to delete operation. The same scenario doesn't trigger an error in case of edit.

I wish I could demonstrate it to you, but unfor the application I'm working on is within the intranet with restricted access... But if I can help you otherwise, don't hesiatate to ask.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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