Dynamicweb 8 Documentation
getOrderFields Method
Example 

Gets the order fields.
Syntax
'Declaration
 
Public Shared Function getOrderFields() As OrderFieldCollection
public static OrderFieldCollection getOrderFields()
Example
class MyPage : System.Web.UI.Page
{
 
    private string GetOrderFieldsLayer()
    {
        System.Text.StringBuilder sbReturn = new System.Text.StringBuilder();
        OrderFieldCollection fields  = OrderField.GetOrderFields();

        sbReturn.Append("<div id=""OrderFieldLayer"" style=""position:absolute; display:none"">");
        if( fields.Count > 0 ) {
           sbReturn.Append("<table style=""border:solid 1px #7F9DB9; background-color:#ffffff"" cellpadding=""0"" cellspacing=""0"">");
           sbReturn.Append("<tr><td>"); 
           sbReturn.Append("<div>");
        }
        foreach( OrderField field in fields )
        {
           sbReturn.AppendFormat("<table style=""cursor:hand"" cellpadding=""0"" cellspacing=""0"" onClick=""addOrderField('{0}','{1}');"" onmouseover=""mouseoverBox(this);"" onmouseout=""mouseoutBox(this);""><tr>" + 
                                 "  <td style=""height:20px; width:20px; background-color:#D4D0C8"" align=""center""><img src=""../images/arrow.gif"" border=0></td>" + 
                                 "  <td style=""PADDING-LEFT: 5px; "">&nbsp;{2}</td>" + 
                                 "  <td style=""WIDTH:9px;""></td>" + 
                                 "</tr></table>",  
                                 Base.HtmlEncode(Base.JSEncode(field.SystemName)), 
                                 Base.HtmlEncode(Base.JSEncode(field.Name)), 
                                 Base.HtmlEncode(field.Name) 
                                 );
        }
        sbReturn.Append("</div>");
        sbReturn.Append("</td></tr>");
        sbReturn.Append("</table>");
 
        return sbReturn.ToString();
    }
}
class MyPage : System.Web.UI.Page
{
   public void DoDeleteAll()
   {
       foreach (OrderField orderField in OrderField.getOrderFields())
       {
           orderField.Delete();
       }
   }
}
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

OrderField Class
OrderField Members

Send Feedback