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
Multiple jQgrids WITH filtertoolbar in jqueryUI Tabs causes JavaScript Errors
09/07/2013
19:43
Avatar
khalidk7
New Member
Members
Forum Posts: 1
Member Since:
09/07/2013
sp_UserOfflineSmall Offline

I posted the bug here on stackoverflow, it includes the source code of a sample page, to recreate the bug:

The question ID in stackoverflow is:  17551942

(I can't post the URL because this forum doesn't allow for it – just search for that ID on stackoverflow and it will come up.)

A working sample of this bug/issue can also be found on jsFiddle: http://jsfiddle.net/ut5aE/

Basically when using jquery UI tabs with multiple jqGrids that have the "filterToolbar", when you click on the "sort operations" button (e.g. "==") on successive tabs, you get the following javascript error in query.jqGrid.src.js and there is no popup showing the other sort operation options:

(This is using the 4.5.2 version)

Line: 4156 Error: Unable to get property 'searchoptions' of undefined or null reference

Here is a screen shot taken with debugger:
debugger javascript errorImage Enlarger

So to recreate the problem I am experiencing ( browse to the jsfiddle link: http://jsfiddle.net/ut5aE/) and do the following:
1.) Click on "Tab 2"
2.) Click on any search operation ("==") and notice that the other list of search operations come up.
3.) Click on "Tab 1"
4.) Click on any search operation ("==") and notice that the other list of search operations come up.
5.) Click back on "Tab 2"
6.) Click on any search operation ("==") on any column EXCEPT for the 1st column ("serial"). Now the search operation window showing the other search operations does NOT pop up and you get the javascript error in the file jquery.jqGrid.src.js noted above.

What is strange is that if all the jqGrids in the tabs have the same column names, then this behavior doesn't happen, and everything works fine.

Is there a workaround to this bug?  I need to deploy a system to production which employs this .

A working sample fo this bug/issue can be found on jsFiddle: http://jsfiddle.net/ut5aE/

Please let me know if this is a bug or if I'm doing something wrong?

thank you in advance,

16/08/2013
04:17
Avatar
NibyNool
New Member
Members
Forum Posts: 1
Member Since:
16/08/2013
sp_UserOfflineSmall Offline

I think I've worked out the cause of this issue.

Find the following in the code:

$(".soptclass").click(function(e){

Replace it with:

$($t.grid.hDiv).find(".soptclass").click(function(e){

After a fair bit of investigation it appears that the click function is applied to all grids that currently exist, this results in only the last grid working correctly;  by changing the code that defines the click event and restricting it to only the one table it will work correctly.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 496

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