Forum
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.
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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66