Dynamicweb 8 Documentation
StockGroup Property
Example 

Gets or sets the stock group.
Syntax
'Declaration
 
Public Property StockGroup As StockGroup
public StockGroup StockGroup {get; set;}
Example
class MyPage : System.Web.UI.Page
{
   protected System.Web.UI.WebControls.DropDownList StockGroupID;
   private Product product;
   public void CreateDropDown()
   {
       SortedList stocklist = new SortedList();
       StockGroupCollection stocks = Dynamicweb.eCommerce.Common.Application.StockGroups;
       foreach (StockGroup stock in stocks)
       {
           if (stock.ID == product.StockGroup.ID)
           {
               stocklist[Convert.ToString(stock.ID)] = stock.Name;
           }
        }
       product.StockGroupID = Base.ChkString(Base.Request("StockGroupID"));
       Dynamicweb.eCommerce.Common.Gui.CreateDropDown(stocklist, StockGroupID, product.StockGroupID);
   }
}
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

Product Class
Product Members

Send Feedback