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
Pagination icons (ui-icon-seek-next and ui-icon-seek-end) still enabled on zero search results
24/01/2012
16:28
Avatar
eadj3i
New Member
Members
Forum Posts: 2
Member Since:
24/01/2012
sp_UserOfflineSmall Offline

Hi guys,
While poking around with jqGrid, I think I found the following bug.

A search results with rows less than the grid's rowNum shows the icons  (ui-icon-seek-next and ui-icon-seek-end) disabled.
But in a situation when there are no results set (zero rows), the above mentioned icon should be disabled because there are no pages to navigate next to, but this is not the case. They are rather enabled. 

Remember this error occured when the grid object was updated with another request, after creation using:
gridObj[0].addJSONData(data); 

Here is how I fixed it: by making the following change in the updatepager, line 1632 to the following:

FROM
if(cp==last || cp === 0) {…}
TO
if(cp==last || cp === 0 || ts.p.reccount === 0) {…}
Can someone look into this?

24/01/2012
16:53
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

I can not reproduce this error, but it seems your data is not correct.

Please see what is returned from the server from the other request - with other words check your data before to pass it to the addJSONData.

Regards

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.

24/01/2012
17:50
Avatar
eadj3i
New Member
Members
Forum Posts: 2
Member Since:
24/01/2012
sp_UserOfflineSmall Offline

How did you try to reproduce it?

Did you create the grid first, and at the same time saving the returned gridObject for a second request?

The second request should look like this:

$.ajax({
url: '###',
type: 'GET',

data: params,
success: function(data){
gridObj.jqGrid('clearGridData');
gridObj.jqGrid(setGridParam, {sortorder: 'asc'});
gridObj[0].addJSONData(data); 

});

gridObj is an already rendered grid with pagination and then passed in to this function for a new request and update.
Let me know if you need further clarification. 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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