Forum


22:51

24/02/2010

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.
21:04

Moderators
30/10/2007

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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66