Dynamicweb 8 Documentation
Sort(String,SortOrderType) Method
Example 

Name of the field.
The sort order.
Sorts the specified field name.
Syntax
'Declaration
 
Public Overloads Sub Sort( _ 
   ByVal FieldName As String, _ 
   ByVal SortOrder As OrderCollection.SortOrderType _ 
) 
public void Sort( 
   string FieldName,
   OrderCollection.SortOrderType SortOrder 
)

Parameters

FieldName
Name of the field.
SortOrder
The sort order.
Example
class MyPage : System.Web.UI.Page
{
   private void Page_Load(object sender, System.EventArgs e)
   {
       int uid = new Dynamicweb.Frontend.Extranet().UserID;
       if (uid == 0) { Response.End(); }

       CustomerOrderCollection customerOrders = new CustomerOrderCollection();
       customerOrders.Load(uid);
       customerOrders.Sort("OrderID", OrderCollection.SortOrderType.Asc);
       foreach (Order enumOrder in customerOrders)
       {
           foreach (OrderLine orderLine in enumOrder.OrderLines)
           {
               //TODO: insert your code here
           }
       }
   }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

OrderCollection Class
OrderCollection Members
Overload List

Send Feedback