Class TreeColumnAdvCollection
Represents a collection of TreeColumnAdv objects.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Tools.MultiColumnTreeView
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class TreeColumnAdvCollection : CollectionBase, IList, ICollection, IEnumerable, ICloneable
Constructors
TreeColumnAdvCollection(MultiColumnTreeView)
Initialize a new instance of the TreeColumnAdvCollection class.
Declaration
public TreeColumnAdvCollection(MultiColumnTreeView tree)
Parameters
Type | Name | Description |
---|---|---|
MultiColumnTreeView | tree | Reference on parent Tree. |
Properties
Item[Int32]
Gets or sets a collection items by index.
Declaration
public TreeColumnAdv this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Treecolumn index. |
Property Value
Type |
---|
TreeColumnAdv |
TreeView
Gets the parent control.
Declaration
public MultiColumnTreeView TreeView { get; }
Property Value
Type |
---|
MultiColumnTreeView |
VisibleColumns
Gets array of visible columns.
Declaration
public TreeColumnAdv[] VisibleColumns { get; }
Property Value
Type |
---|
TreeColumnAdv[] |
Methods
Add(TreeColumnAdv)
Add column into collection.
Declaration
public int Add(TreeColumnAdv column)
Parameters
Type | Name | Description |
---|---|---|
TreeColumnAdv | column | reference on column. |
Returns
Type | Description |
---|---|
System.Int32 | Order Index of column. |
AddRange(TreeColumnAdv[])
Add range of columns into collection.
Declaration
public void AddRange(TreeColumnAdv[] columns)
Parameters
Type | Name | Description |
---|---|---|
TreeColumnAdv[] | columns | Array of columns. |
AddRange(ICollection)
Add range of columns into collection.
Declaration
public void AddRange(ICollection columns)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ICollection | columns | Array of columns. |
Clone()
Clone collection and it items.
Declaration
public TreeColumnAdvCollection Clone()
Returns
Type | Description |
---|---|
TreeColumnAdvCollection | Copy of the this collection. |
Contains(TreeColumnAdv)
Represents this method check is column in collection or not.
Declaration
public bool Contains(TreeColumnAdv column)
Parameters
Type | Name | Description |
---|---|---|
TreeColumnAdv | column | reference on column to check. |
Returns
Type | Description |
---|---|
System.Boolean | True - column found in collection, otherwise False. |
GetTotalColumnsWidth()
Represents this method return accumulated width of all columns.
Declaration
public int GetTotalColumnsWidth()
Returns
Type | Description |
---|---|
System.Int32 | Return Total Column WIdth |
Remarks
Method ignore visibility settings.
GetTotalColumnsWidth(Boolean)
Represents this method return accumulated width of all columns.
Declaration
public int GetTotalColumnsWidth(bool visible)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | visible | True - count only visible columns, otherwise False. |
Returns
Type | Description |
---|---|
System.Int32 | Accumulated width in pixels. |
GetVisibleColumnsCount()
Represents this method return the column count of visible items in TreeColumnAdv.
Declaration
public int GetVisibleColumnsCount()
Returns
Type |
---|
System.Int32 |
IndexOf(TreeColumnAdv)
Represents this method return order index of item if it exists in collection, otherwise -1.
Declaration
public int IndexOf(TreeColumnAdv column)
Parameters
Type | Name | Description |
---|---|---|
TreeColumnAdv | column | reference on column. |
Returns
Type | Description |
---|---|
System.Int32 | -1 if nothing found, otherwise column order index. |
Insert(Int32, TreeColumnAdv)
Insert column into collection.
Declaration
public void Insert(int index, TreeColumnAdv column)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | insert position. |
TreeColumnAdv | column | Column reference. |
OnClearComplete()
On collection clearing method raise CollectionChanged event with corresponding parameters.
Declaration
protected override void OnClearComplete()
Overrides
OnInsertComplete(Int32, Object)
On item inserting into collection set correct parent. Method raise CollectionChanged event with corresponding parameters.
Declaration
protected override void OnInsertComplete(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Treenode index |
System.Object | value | TreecolumnAdv value |
Overrides
OnRemoveComplete(Int32, Object)
On item remove from collection reset column parent. Method raise CollectionChanged event with corresponding parameters.
Declaration
protected override void OnRemoveComplete(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Tree node index |
System.Object | value | TreeColumn object |
Overrides
OnSetComplete(Int32, Object, Object)
On item replace/set in collection change items Parents. Method raise CollectionChanged event with corresponding parameters.
Declaration
protected override void OnSetComplete(int index, object oldValue, object newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Tree node Index |
System.Object | oldValue | Old value |
System.Object | newValue | new Value |
Overrides
OnValidate(Object)
Method check correctness of input parameters.
Declaration
protected override void OnValidate(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | parameter to check. |
Overrides
RaiseCollectionChanged(CollectionChangeEventArgs)
Utility method used for CollectionChanged event raising.
Declaration
protected void RaiseCollectionChanged(CollectionChangeEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.CollectionChangeEventArgs | args | Event parameters. |
Remove(TreeColumnAdv)
Remove column from collection.
Declaration
public void Remove(TreeColumnAdv column)
Parameters
Type | Name | Description |
---|---|---|
TreeColumnAdv | column | Treecolumn object. |
Events
CollectionChanged
Raised when collection detect own changes.
Declaration
public event CollectionChangeEventHandler CollectionChanged
Event Type
Type |
---|
System.ComponentModel.CollectionChangeEventHandler |
Explicit Interface Implementations
ICloneable.Clone()
Clone collection.
Declaration
object ICloneable.Clone()
Returns
Type | Description |
---|---|
System.Object | Reference on cloned version of the current collection. |