|
ghis
|
 |
« Reply #2 on: June 04, 2011, 06:48:45 PM » |
|
Well it seems that there's not much action here, so I had to take a little more look into this.
1st problem (page size) -- FIXED Found solution, I found the property I needed by looking at the JSON result with Firebug. So here is the code:
2nd problem (data sorting) -- BUG Data sorting is still a problem and is most probably a bug with the sigmaGrid itself. When sorting per any column from the top, it only seems to be sorting what's displayed on screen, or sorting by 'Page' if you wish to say it that way. I'm using PHP and recordType is set to 'object' in the property of the grid as mentioned from previous code. Here's a quick example, let say we have field "No" and the Page Size is set to "5", Our full data set is this: 1, 2, 3, 4, 5, 8, 10, 12
Since we only display 5 at a time, we will see these on 1st page: 1, 2, 3, 4, 5
when sorting descending, we would expect to have this: 12, 10, 8, 5, 4 <-- GOOD
though in reality it only seems to sort data on screen, so we end up with: 5, 4, 3, 2, 1 <-- WRONG
[The Real Problem] When Sorting (click any of the field in the grid), it should in theory query again the database though it is not. The Sort only works as per page because the Grid Object only has 1 page loaded in the Object itself.
[Temporary Fix] This is temporary and is not the best solution, though is prove to work. From the SigmaGrid PHP example, remove the LIMIT portion of the database query, so you will load everything inside the Grid Object, performance wise it will be ugly if you have lot of data, but the sort will work.
|