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
Programmatically setting the grid to visible makes grid not load/reload
24/02/2010
22:51
Avatar
GilAdam
New Member
Members
Forum Posts: 1
Member Since:
24/02/2010
sp_UserOfflineSmall Offline

I'm probably not doing this the right way, so please let me know if that's the case, but..

What I want to achieve is:

1. Grid starts out minimized

2. When somebody clicks a button on my page, I want to show the grid maximized and then have it do its loading thing.

3. The next time somebody clicks the button, it knows it's already maximized and then just triggers the reload of the data.

4. I want the cool animation for the minimize/maximize.

The issue I'm experiencing is:

1. If I set the grid state to visible programmatically, and then do .trigger("reloadGrid") it doesn't seem to do anything and the grid doesn't seem to load.

What I'm doing is:

I'm creating my grid with the hiddengrid property set to true so that my page starts out with the grid minimized. (hiddengrid: true)

Then I've got a method that looks like this:

function performMySearch() {

if ($("#mySearchResultsGrid").jqGrid('getGridParam', 'gridstate') == "hidden") {

$("#mySearchResultsGrid").jqGrid('setGridState','visible');

}

$("#mySearchResultsGrid").trigger("reloadGrid");

}

I appreciate any insights anyone might have.

27/02/2010
21:04
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Setting the state hidden and visible with setGrid param will not work. You should always use setGridState with reloading the grid.

Best 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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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