Dynamicweb.eCommerce.Products Namespace : PropertyTypeCollection Class |
'Declaration
<SerializableAttribute()> Public Class PropertyTypeCollection Inherits System.Collections.ObjectModel.Collection(Of PropertyType)
[SerializableAttribute()] public class PropertyTypeCollection : System.Collections.ObjectModel.Collection<PropertyType>
class MyPage : System.Web.UI.Page { public void ContextMenu() { Dynamicweb.Controls.ContextMenu FieldsContext = new Dynamicweb.Controls.ContextMenu(); PropertyTypeCollection propTypes = Dynamicweb.eCommerce.Common.Context.PropertyTypes; if (propTypes.Count > 0) { foreach (PropertyType propType in propTypes) { Dynamicweb.Controls.ContextMenuButton btn = new Dynamicweb.Controls.ContextMenuButton(); btn.Image = Dynamicweb.Controls.Icons.Icon.Type.Check; btn.Text = propType.Name; btn.DoTranslate = Dynamicweb.Controls.ContextMenuButton.TranslateStates.False; btn.OnClientClick = string.Format("checkTab('PROPERTY', 4, function(){{AddPropertyLine('ADD','{0}');}});", propType.ID); FieldsContext.Controls.Add(btn); } } } }
System.Object
System.Collections.ObjectModel.Collection<T>
Dynamicweb.eCommerce.Products.PropertyTypeCollection
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