Sigma Php Ajax framework, Ajax Components, GUI Builder
May 23, 2012, 03:43:23 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
Sigma Php Ajax framework, Ajax Components, GUI Builder
>
Sigma Grid
>
Sigma Grid - Q&A
(Moderators:
steven
,
gbolanoscruz
) >
Sorting Problem
Pages: [
1
]
« previous
next »
Print
Author
Topic: Sorting Problem (Read 899 times)
Darshan
Full Member
Posts: 36
Sorting Problem
«
on:
January 12, 2009, 11:04:54 PM »
hello friends,
I got one major problem in grid when we sort data.
http://www.sigmawidgets.com/products/sigma_grid2/demos/example_column_sortable.html
Here when we press key on column for sorting at that time data is sort in ascending order, after when we press at that time data in desc. order. Its ok..
But now again when we press for sorting at that time it show 1st data at last and other all data from starting, so here some thing wrong.
Please you can check and let me know if you have any proper solution.
Waiting for your reply... Thanks...............
Logged
steven
Moderator
Hero Member
Posts: 544
Re: Sorting Problem
«
Reply #1 on:
January 13, 2009, 01:00:19 AM »
Oooh, that's not a problem.
there are three status, asc, desc, orginal. you came to orginal by click 3 times. if you click once more. you will get asc, then once more, you will get desc, then orginal ... ...
Logged
Sigma AJAX Data Grid - Easy to Integrate with PHP, ASP Classic, ASP.NET & Java
Sigma PHP Ajax Framework - WYSIWYG GUI Builder With Tree, Grid, Treegrid, Dialog, Tab & More Component
V1RuZ
Jr. Member
Posts: 12
Re: Sorting Problem
«
Reply #2 on:
May 14, 2009, 08:36:16 AM »
Hi, could someone be kind enough to place an example of how to remove default sorting from the gt_grid_all.js file. I tried removing the |defaultsort| from the file, but that broke all my grids
Be greatly appreciated
Logged
lifeform
Jr. Member
Posts: 12
Re: Sorting Problem
«
Reply #3 on:
May 14, 2009, 11:36:48 AM »
I ran into the same problem, but worked around it in my server side controller by setting the sort order to descending only if the parameter is "desc", otherwise I set it to "asc". You could, of course, do something else if the parameter is "defaultsort".
$orderField = $json->{'sortInfo'}[0]->{'columnId'}; if($orderField != "") { $sortorder = ($json->{'sortInfo'}[0]->{'sortOrder'}=='desc') ? 'desc':'asc'; $orderpart = "ORDER BY ".$orderField." ".$sortorder; }
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News & Announcements
-----------------------------
Sigma Visual GUI Builder & Library
-----------------------------
=> Sigma Visual - Knowledge Share
=> Sigma Visual - Q&A
=> Bug Report & Wishlist
-----------------------------
Sigma Grid
-----------------------------
=> Sigma Grid - Q&A
=> Show Case
=> Bug Report & Wishlist
-----------------------------
Other
-----------------------------
=> AJAX & JavaScript
Loading...