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_TopicIcon
Pager as an object
07/07/2010
00:26
Avatar
vchekan
Member
Members
Forum Posts: 10
Member Since:
07/06/2010
sp_UserOfflineSmall Offline

Currently pager can be passed into jqGrid and navGrid as string selector only. For example

...navGrid("#selectedRowsPager",...

But here is my problem. I create a grid with forms edit, and I define one of columns as custom element. And I use another grid to represent this custom column in forms edit mode.

The "custom_element" function must return newly built element. The jqGrid will attach this element. So during the custom column build process the element is not attached to the document yet. This is why

$("<table id='selectedVerticalGrid'></table><div id='selectedVerticalPager'></div>").jqGrid({..., pager: "#selectedVerticalPager"})

will fail: there is no #selectedVerticalPager attached to the document.body yet.

Admitedly, this can be fixed by attaching html fragment to the body before calling jqGrid, but it seems rather a hack. And it is just weird that I am forced to pass selector which needs to be resolved when I have actual object in hands.

Insted I changed the code so that it can accept pager definitition either as string or as dom/jquery object. I did not tested the patch extensively, just made sure "it works for me". You can find my commit here:

http://github.com/vchekan/jqGr.....27a0759a8a

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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