Dynamicweb 8 Documentation
GroupRelation Class
Members  Example 

Class for parent-child relations between product groups
Object Model
GroupRelation ClassGroupRelationCollection ClassGroupRelation ClassGroupRelationCollection ClassGroupRelation Class
Syntax
'Declaration
 
<SerializableAttribute()> 
Public Class GroupRelation 
[SerializableAttribute()] 
public class GroupRelation 
Example
class MyPage : System.Web.UI.Page
{
   private void SaveGroupRelations(Group grp)
   {
       // using additioal collection - to save sorting order
       // load group relations
       GroupRelationCollection relationsList = new GroupRelationCollection();
       for (int i = 0; i <= int.MaxValue; i++)
       {
           string pId = Request["GRPREL_ID" + i];
           if (string.IsNullOrEmpty(pId))
               break;

           GroupRelation g = new GroupRelation(grp.ID, pId);
           g.ID = grp.ID;
           g.ParentID = pId;

           relationsList.Add(g);
       }

       // remove all relations
       GroupRelation grpRelDel = new GroupRelation();
       grpRelDel.Delete(grp.ID);

       // save loaded relations
       foreach (GroupRelation g in relationsList)
       {
           g.Save(g.ID, g.ParentID);
       }
   }
}
Inheritance Hierarchy

System.Object
   Dynamicweb.eCommerce.Products.GroupRelation

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

GroupRelation Members
Dynamicweb.eCommerce.Products Namespace

Send Feedback