Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 27, 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!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Imposing a default sort order on a datagrid
Brannon Buchanan
Posts: 14
 
Imposing a default sort order on a datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Aug 12 1:35 PM
fiogf49gjkf0d

Pretty new to development using App Architect so maybe this will be an easy one for somebody.  I've got a form with a datagrid and its pulling data correctly.  However, I would like to impose a default sort on the data.  Hoping there is something easy I can apply to get an appropriate default sort on the data.


Thanks!

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Imposing a default sort order on a datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Aug 12 10:31 PM
fiogf49gjkf0d

Option 1: One Column Sort


Easy enough for the user to click on the column header. Here's how to do it programmatically:
Create a C# .Net Code Snippet and call this as an OnLoad action for the form.


namespace Sage.BusinessRules.CodeSnippets {


public static partial class MyFormNameEventHandlers


public static void SortPublicationsStep( IMyFormName form,  EventArgs args)
{


  System.Web.UI.WebControls.GridView grid = (System.Web.UI.WebControls.GridView)form.grdMyDataGridName.NativeControl;
SortDirection direction = SortDirection.Descending;
grid.Sort("MyFieldName", direction);


}


}


}

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Imposing a default sort order on a datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Aug 12 11:00 AM
fiogf49gjkf0d

Hi Brannon,


Here's several articles that will help:


Setting the Default Sort for a DataGrid in SalesLogix Web
http://customerfx.com/pages/crmdeveloper/2008/03/07/setting-the-default-sort-for-a-datagrid-in-saleslogix-web.aspx 


Setting the Default Sort for a DataGrid in SalesLogix Web REVISITED
http://customerfx.com/pages/crmdeveloper/2009/03/26/setting-the-default-sort-for-a-datagrid-in-saleslogix-web-revisited.aspx  


Adding a sort order programatically to a SalesLogix gird conrol
http://customerfx.com/pages/integrationblog/2011/07/25/adding-a-sort-order-programtically-to-a-saleslogix-grid-control.aspx 


Error attempting to sort a SalesLogix web grid control 
http://customerfx.com/pages/integrationblog/2009/11/20/error-attempting-to-sort-a-saleslogix-web-grid-control.aspx 


-Ryan

[Reply][Quote]
Brannon Buchanan
Posts: 14
 
Re: Imposing a default sort order on a datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Aug 12 11:15 AM
fiogf49gjkf0d

Workd great...thank you!!

[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/27/2025 5:51:06 PM