Dynamicweb 8 Documentation
PropertyTypeCollection Class
Members  Example 

Represents a collection of PropertyType objects.
Object Model
PropertyTypeCollection ClassPropertyType Class
Syntax
Example
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);
            }
        }
    }
}
Inheritance Hierarchy

System.Object
   System.Collections.ObjectModel.Collection<T>
      Dynamicweb.eCommerce.Products.PropertyTypeCollection

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

PropertyTypeCollection Members
Dynamicweb.eCommerce.Products Namespace

Send Feedback