Forum


12:27

10/11/2009

I've the last one release of jqGrid.
I want this features:
it have to load only once all the data and never ask it again to load again.
I'm using Yii framework so I don't have to do querys to SQL to load datas.
This is my example. I've an object $category.
In $category->elements i've all my elements.
So the count of element will be $count = count($category->elements) and so on.
When I have to iterete I will do
for ( $i = 0; $i < $count; $i++ ) {
$response[$i]['id'] = $category->elements[$i]->elementId
$response[$i]['cell'] = array( $category->elements[$i]->elementId, $category->elements[$i]->title)
}
echo json_encode($response);
But it doesn't work ( nothing is loaded and the grid is "strange" )
Someone can gimme a simple example that fix my request and my code?
12:47

10/11/2009

Sorry my fault. Now it works ( i set the width manually ).
Anyway I've a problem: it doesn't order at all when I click on some arrow ( up/down ). Does it order with ajax request requesting the new order or if I specify "load once" it order the records with it's own cached data in the script?
Thank you very much ( i'm using the example load once in the demos )
03:28

Moderators
30/10/2007

Hello,
Read the docs for client side sorting. Also in client side sorting you will need to set some other parameter in colModel in order to work this.
http://www.trirand.com/jqgridw.....el_options
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:
75 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