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
.scrollGrid() function breaks backward compatibility
19/04/2011
07:07
Avatar
mnaoumov
Member
Members
Forum Posts: 6
Member Since:
17/01/2011
sp_UserOfflineSmall Offline

scrollGrid() function breaks backward compatibility

In previous versions (3.8.2) scrollGrid function has signature

scrollGrid: function() { … }

In version 4.0.0 

scrollGrid: function(e) { … e.stopPropagation(); }

So such code from 3.8.2: grid.scrollGrid() fails with error

Message: 'undefined' is null or not an object

Line: 832

Char: 5

Code: 0

URI: http://localhost/Project/JavaS.....rid.src.js

I think that last lines in scrollGrid() should be replaced with

if (e) e.stopPropagation();
19/04/2011
10:05
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

In which cases this brake the code? In which browser? In which jQuery version? and etc.

A testcase will be great appreciated.

I think there is something else here ( maybe your own custom code for scrolling)

Actually I do not have such problems.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

19/04/2011
10:10
Avatar
mnaoumov
Member
Members
Forum Posts: 6
Member Since:
17/01/2011
sp_UserOfflineSmall Offline

Sorry for unclear topic 🙂

The use case is quite simple:

you just call

$('#grid').scrollGrid();

and this code will fail in jqGrid 4.0, because its parameter e is undefined.

It fails silently but if you attach debugger with prompting on errors you will see the error.

19/04/2011
10:24
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

The correct way is

$('#grid').scroll( scrollGrid );

The purpose of this function is not to be called as method, but as other code inside the grid (not outside)

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

19/04/2011
10:32
Avatar
mnaoumov
Member
Members
Forum Posts: 6
Member Since:
17/01/2011
sp_UserOfflineSmall Offline

Dear Tony

First of all your code is not correct :)

Probably you meant

$('#grid').scroll( $('#grid').scrollGrid );

But actually it is not that we wanted to achieve.

We called scrollGrid() method because we wanted to enforce scrolling

To fix the issue mentioned above I wrote a simple workaround:

grid.scrollGrid($.Event());

but actually I don't like this ugliness and think that my suggestion from first topic should be done in jqGrid library :)

20/04/2011
12:30
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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