Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 6, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - Controls
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Controls | New ThreadView:  Search:  
 Author  Thread: Sort by more than one column at once
Christopher Bean
Posts: 10
 
Sort by more than one column at onceYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Jun 07 9:34 PM
We just upgraded to SLX v7 from v5.2. Our software developers used to be able to sort a list view in the defect module of support client by more than one column at once by SHIFT-Clicking the columns.

In the SLX v7 Client, this does not work. Has anybody found this functionality?
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Sort by more than one column at onceYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Jun 07 11:05 PM
The standard SLX datagrid does not provide this ootb. One possible workaround is to add 'sort by' buttons which modify the grid's underlying SQL. Or maybe use a 3rd party datagrid.
[Reply][Quote]
Shawn O'Ferrall
Posts: 21
 
Re: Sort by more than one column at onceYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Jun 07 7:03 AM
For what it's worth... (in 6.2.x - haven't seen 7.x). It APPEARS as if you can do this in the SQL property of the datagrid, but unfortunately many of the properties in the SQL property are trumped by the Columns properties (visible being the most frustrating). And in this case, the 'sorting' in the SQL property just doesn't do anything you expect it too.

Anyway - what Phil said is an answer. Alternatives (in Code) are to get the datagrid.SQL.Text and append an “Order By” statement (look at the SQL first to get the aliasing right and make sure there isn’t already an order by there).
[Reply][Quote]
Christopher Bean
Posts: 10
 
Re: Sort by more than one column at onceYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Jun 07 8:43 AM
Thanks guys. I appreciate it.
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Sort by more than one column at onceYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jun 07 1:50 PM
One thing not mentioned (and in as early as 6.1 I think) is the GroupPanel property of the grid. This allows users to drag columns and create sort chains. Furthermore, you can use this programmatically by setting a Grid.Column.Group index (0 based) and create your sort chains programmatically.

When we upgraded from 5.2 to 6.1, I used this to prevent the Sortable = true "load entire recordset into memory". While this is generally never a problem because tables are small, it can easily become a hassle for large tables and to my knowledge this is the only method to work around the problem.

In addition to that, I found that in v7 SP1 when sortable = true the grid won't automatically jump or select the first record. This is present in the default Attachments grids as the date selection is sorted but it'll automatically scroll to the bottom, most likely because the sort isn't applied until last instead of at the SQL level. GroupPanel would most likely solve the problem a little easier than finding the first record in the recordset and re-selecting it manually (which apparently I got wrong).
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Sort by more than one column at onceYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Jun 07 9:06 AM
It's been gone since 6.x and the new grids (and all their incarnations/versions).

Multiple choice picklist control with the field names in it? On Popup Control parse out the selected column headers.....nope, can't specify order.

How about a list of fields, with an edit box next to it to specify sort order.....blank or zero ignore. Ties, simply go with the control order.

Then when you fire off a refresh you can either redo the SQL.....or you can play with the column control itself.

Don't have the syntax in front of me, but it's like Ryan's build a grid dynamically stuff...

grdname.columnobject.Sort(1) sorts on the 2nd column....
.Group(1) sorts and Groups by the 2nd column (and displays the group in the header row, and the group caption in the Grid header).

then
grdname.refresh

so
ACCOUNT CONTACT COMPLETEDDATE STATE USERNAME
1 <> -2 0 3
aND THEN HAVE A refRESH button.

I don't know how to do descending sorts without using SQL....

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/6/2025 9:56:59 PM