Intersoft WebGrid Documentation
ParentRootMode Enumeration
Example  See Also  Send Feedback
ISNet.WebUI.WebGrid Namespace : ParentRootMode Enumeration






Value representing where the root table of the self referencing table point to.

Syntax

Visual Basic (Declaration) 
Public Enum ParentRootMode 
   Inherits System.Enum
Visual Basic (Usage)Copy Code
Dim instance As ParentRootMode
C# 
public enum ParentRootMode : System.Enum 
Delphi 
public enum ParentRootMode = class(System.Enum)
JScript 
public enum ParentRootMode extends System.Enum
Managed Extensions for C++ 
__value public enum ParentRootMode : public System.Enum 
C++/CLI 
public enum class ParentRootMode : public System.Enum 

Members

MemberDescription
NullValueNullValue is a property to show self reference table based on null value.
SelfReferencingNodeSelfReferencingNode is a property to show the self reference table based on only the parent node which has reference.
UseParentRootValueUseParentrootValue is a property to show self reference table based on the parent value.

Example

Sample codes below is recommended to be placed inside PrepareDataBinding event if Runtime Data Binding method is utilized, but if DesignTime Data Binding method is utilized, then it's safe to place the codes inside InitializeLayout or PrepareDataBinding event since the columns collection have been determined earlier using DesignTime Data Binding.
C#Copy Code
WebGrid1.RootTable.SelfReferencingSettings.Enabled = true;
WebGrid1.RootTable.SelfReferencingSettings.ParentDataMember = "EmployeeID";
WebGrid1.RootTable.SelfReferencingSettings.ChildDataMember = "ReportsTo";
WebGrid1.RootTable.SelfReferencingSettings.ExpandColumnMember = "FirstName";
WebGrid1.RootTable.SelfReferencingSettings.ParentRootMode = ISNet.WebUI.WebGrid.ParentRootMode.UseParentRootValue;
// A DropDownList is configured with a collection of the possible values of ParentRootValue
WebGrid1.RootTable.SelfReferencingSettings.ParentRootValue = Int32.Parse(DropDownList1.SelectedItem.Value);

Remarks

ParentRootMode is a setting in WebGrid.NET with Self Reference. There are three options of ParentRootMode to determine where the self referencing table point to: UseParetRootValue, NullValue, SelfReferencingNode. In order to use ParentRootMode based on the UseParentRootValue, we need to define some major SelfReference settings. 

There are 4 major properties which need to be placed in order to configure Self Referencing table. They are Enabled, ParentDataMember, ChildDataMember and ExpandColumnMember. Since we would like to designate a value other than 'Null' value as the ParentRootValue then the ParentRootMode property as well as ParentRootValue property need to be configured.

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         ISNet.WebUI.WebGrid.ParentRootMode

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.