BinaryTreeListView
A list view style control that brings in conventional tree and list view styles into one control.
public class BinaryTreeListView : DataGridView
Inherits from / implements: DataGridView
Remarks
To get this control working for you, all you will need to do is these:
1. Instantiate the control.
2. Set up columns in the control, including one column that is of type BinaryTreeListViewColumn.
3. Set up any properties on the control, that you want it to have by default, like node image, line drawing color, etc.
4. Create instances of nodes (BinaryTreeListViewNode, by making a call to the control instance's Nodes.Add(...) method.
5. Create child nodes on each of these nodes you have created, as per your hierarchical data mode requirements.
That is all to it! You are ready to watch your hierarchical data in a tree-list view style view :-)
Members at a glance
BinaryTreeListView | Constructs a new instance of BinaryTreeListView class. |
AllowDataErrorExceptionToBeThrown | Gets or sets whether the control should allow to flow data error exceptions. |
AllowUserToAddRows | Gets or sets a value indicating whether the option to add rows is displayed to the user. |
AllowUserToDeleteRows | Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView. |
AllowUserToSortColumns | Gets or sets whether clicking a column header sorts the tree by that column: ascending, then descending, then back to the order the nodes were built in. |
BuiltInCustomRenderedTargetElement | Gets or sets the target UI element (like column header cell, row header cell and row) that is to be custom drawn by the built-in renderer, by using the color properties. |
BusyIndicatorText | Gets or sets the busy indicator text. |
BusyIndicatorTextBackColor | Gets or sets the backcolor of the busy indicator text. |
BusyIndicatorTextFont | Gets or sets the font for the busy indicator text. |
BusyIndicatorTextForeColor | Gets or sets the forecolor of the busy indicator text. |
CellBorderColor | Gets or sets the color of the cell border. |
CellBorderDrawingColor | Gets or sets the color for drawing the cell border, when the UseBuiltInRendering property is switched on, with option set to draw either Column headers or All. |
CellBorderWidth | Gets or sets the width of the cell border. |
CellEditingMode | Custom implementation of the EditMode property. |
CollapseImage | Gets or sets the image to be used to draw the "collapse" state of the node. |
ColumnBackgroundDefaultCellStyleBackColor | Gets or sets the color of the column background default cell style back. |
ColumnBackgroundOnCellSelectionColor | Gets or sets the color of the column background when a cell is selected. |
ColumnBackgroundOnMouseHoverColor | Gets or sets the color of the column background on mouse hover. |
ColumnHeaderBottomBorderColor | Gets or sets the colour of a hairline drawn along the bottom of the column headers, when the UseBuiltInRendering property is switched on with the option set to draw either column headers or all. Empty, the default, draws none. |
ColumnSeparatorDrawingColor | Gets or sets the color for drawing the column separator, when the UseBuiltInRendering property is switched on, with option set to draw either Column headers or All. |
ControlDataDisplayMode | Gets or sets whether to run the control in its tree-list or list-view mode. |
CurrentNode | Returns the current active node in the control. |
DepthForPreparingNodesWithChildren | Gets or sets as to how many nested levels of depth the control should read data and build nodes with its children. |
DrawColumnSeparatorWhenUsingBuiltinRendering | — |
DrawGlassBackgroundHighlightingOnMouseEnter | Gets or sets a value indicating whether to draw "glass" background highlighting on mouse entering a row. |
DrawNodeConnectingLines | Gets or sets whether to draw the lines to show connections between the nodes. |
EnableAutomaticBuiltInDragDrop | Gets or sets a value indicating whether the control should enable the automatic custom built-in drag and drop feature for tree-list nodes within the control. |
EnableCommitingEditWhenMovingFocusFromEditContext | Gets or sets whether the control should commit any user edits in the node, when the user clicks on the other areas in the same cell - i.e. when he clicks on the image area or the expand/collapse area in the BinaryTreeListViewCell instance. |
EnableExpandCollapsingOfNodesUponMouseClickOnReadOnlyTreeListViewNodeCellOrColumn | Gets or sets whether to enable expand/collapse of nodes (that have children) when the user clicks on the node/cell when their ReadOnly property is true. |
EndColorForRenderingColumnHeader | Gets or sets the end color for rendering the column header. |
EndColorForRenderingRow | Gets or sets the end color for rendering the row. |
EndColorForRenderingRowHeader | Gets or sets the end color for rendering the row header. |
ExpandCollapseNodeOnDoubleClick | Gets or sets whether double-clicking a node's cell in the tree column expands or collapses it. The expand glyph toggles on a single click either way. The default is true. |
ExpandCollapsingOfNodesLevel | Gets or sets the level at which the keyboard based nodes expanding/collapsing functionality is to work. |
ExpandImage | Gets or sets the image to be used to draw the "expand" state of the node. |
ExpandTargetDropNodeUponDragDrop | Gets oir sets whether the control should expand all nodes in the target node location upon drag/drop drop action completing. |
FrameBorderColor | Gets or sets the colour of the frame's border (see ShouldDrawFrame). |
FrameBorderThickness | Gets or sets the thickness of the frame's border, in logical (96 DPI) pixels, 0 to 8. |
FrameCornerRadius | Gets or sets the radius of the frame's corners, in logical (96 DPI) pixels, 0 to 32. |
FrameFocusedBorderColor | Gets or sets the colour of the frame's border while the focus is in the control - on the grid or on a cell's editor. Empty keeps FrameBorderColor. |
FramePadding | Gets or sets the space between the frame's border and the grid, in logical (96 DPI) pixels, 0 to 16. It is never less than the corners need to keep the grid inside them. |
FrameShadowColor | Gets or sets the colour of the frame's drop shadow. Its strength is FrameShadowOpacity, so the colour's own alpha is not used. |
FrameShadowDepth | Gets or sets how far the frame's shadow spreads, in logical (96 DPI) pixels, 0 to 24. A third of it is also the distance the shadow drops below the frame. |
FrameShadowOpacity | Gets or sets the strength of the frame's shadow at its darkest, as a percentage, 0 to 100. |
GlassBrushBottomHalfEndColor | Gets or sets the end color of the glass brush (bottom half area). |
GlassBrushBottomHalfStartColor | Gets or sets the start color of the glass brush (bottom half area). |
GlassBrushLinearGradientFactor | Gets or sets the glass brush linear gradient factor. |
GlassBrushTopHalfEndColor | Gets or sets the end color of the glass brush (top half area). |
GlassBrushTopHalfStartColor | Gets or sets the start color of the glass brush (top half area). |
HierarchicalDataSource | Gets or sets a data source object for data-binding to the tree-list view. |
HighlightOnlyTreeListCellDuringDragOver | Gets or sets the value as to whether to change the colors for background and/or foregroun for the entire row or just only the tree-cell, when the user is performing a drag & drop operation. |
IsChildDropDownShowing | Gets or sets whether the current column that is of type BinaryTreeListViewDatePickerColumn has the date picker editor control's dropdown calender window is currently showing/displaying. |
LineDrawingColor | Gets or sets the color for drawing the "nodes connecting" lines. |
LineDrawingDashStyle | Gets or sets the drawing style to be used to draw the "nodes connecting" lines. |
NodeImage | Gets or sets the Image for all node instances in this control. |
Nodes | Gets the nodes in the control's nodes collection. |
NodesSortColumn | Gets the column the nodes are sorted by, or null when they are in the order they were built in. |
NodesSortDirection | Gets the direction the nodes are sorted in, or None. |
NodesSortOrder | Gets or sets the nodes sort order. |
OptimiseLayoutRenderingDuringDragDrop | Gets or sets whether to run an optimisation for layout adjustments during drag/drop action. |
OrientationAspectForRenderingColumnHeader | Gets or sets the orientation aspect for rendering column header. |
OrientationAspectForRenderingRow | Gets or sets the orientation aspect for rendering row. |
OrientationAspectForRenderingRowHeader | Gets or sets the orientation aspect for rendering row header. |
RowSelectionBackColorDuringDragOver | Gets or sets the row/cell selection backcolor when the user is performing a drag & drop operation. |
RowSelectionForeColorDuringDragOver | Gets or sets the row/cell selection forecolor when the user is performing a drag & drop operation. |
RowTemplate | Custom implementation of RowTemplate property. |
Rows | Custom implementation of Rows property. |
ShouldDrawCellBorderWhenSelected | Gets or sets a value indicating whether the control should draw cell border when the cell is selected. |
ShouldDrawColumnBackgroundUponCellSelection | Gets or sets a value indicating whether the control should draw column background upon selecting a cell. |
ShouldDrawColumnBackgroundUponMouseHovering | Gets or sets a value indicating whether the control should draw column background upon mouse hovering. |
ShouldDrawFrame | Gets or sets a value indicating whether the control draws its own frame: a border with rounded corners, an inner padding and, optionally, a drop shadow, all inside its bounds. |
ShouldDrawFrameShadow | Gets or sets a value indicating whether the frame casts a soft drop shadow. |
ShouldEnableFastCaching | Gets or sets a value indicating whether the control should enable fast caching. |
ShouldEnableLinkedRelationshipsTuning | Gets or sets a value indicating whether the control should perform linked relationships tuning. |
ShowNodeImage | Gets or sets whether to show the associated node image NodeImage for each of the node instances in this control's instance. |
SpecialColumnCellsToDisplayEditingControlOnCellsAlways | Gets or sets whether the special column cells (i.e. BinaryDatePicker column, BinaryComboBox column, etc.) should draw the editing control on the cell even when the cell is not in editing mode. |
StartColorForRenderingColumnHeader | Gets or sets the start color for rendering the column header. |
StartColorForRenderingRow | Gets or sets the start color for rendering the row. |
StartColorForRenderingRowHeader | Gets or sets the start color for rendering the row header. |
UseBuiltInRendering | Gets or sets whether to use built-in custom rendering for painting a desired target UI element in the control. |
VirtualMode | Whether the grid asks for cell values as it needs them rather than holding them. Hidden from the base so that setting it repaints, which the inherited property does not do. |
About | Shows the component's about box. It is here for the design-time verb and is not meant to be called from an application. |
BindToTreeListView | Deterministically data binds the control (when in treelistmode) to a data source object. |
ClearAllNodes | Clears all nodes in the control. |
CollapseAllNodes | Collapses all the nodes in the control. |
CollapseNode | Expands the given node and all its children. |
CollapseNode | A helper method to enable collapsing a given node, if the given node is in expanded state. |
Dispose | Releases the resources held by this BinaryTreeListView. |
ExpandAllNodes | Expands all nodes in the control. |
ExpandNode | Expands the given node and all its children. |
ExpandNode | Helper method to perform expansion of a node, if that node contains any child nodes in it, and if it is not already in expanded state. |
GetAllSiblingsForThisNode | Gets a list if BinaryTreeListViewNode sibling objects, given a BinaryTreeListView object node. |
GetFlatListOfNodes | Returns a flat list of all nodes in the control. |
GetFlatListOfNodes | Gets a flattened collection of all child nodes for a given node. |
GetNodeAt | Returns the tree node at the client point supplied. |
OnCellMouseDoubleClick | Raises the CellMouseDoubleClick event, and expands or collapses the node when ExpandCollapseNodeOnDoubleClick is on and the cell is in the tree column. |
OnCellMouseDown | Raises the CellMouseDown event, noting where a pressed column header stood, so a header that is dragged to a new place is not also taken as a click to sort. |
OnCellMouseEnter | Raises the CellMouseEnter event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior. |
OnCellMouseLeave | Raises the CellMouseLeave event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior. |
OnCellPainting | Overrides the base implementation. |
OnColumnAdded | Raises the ColumnAdded event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior. |
OnColumnHeaderMouseClick | Raises the ColumnHeaderMouseClick event, and sorts by the column when AllowUserToSortColumns is on. |
OnColumnWidthChanged | Overrides the base implementation. |
OnDataError | Called when a cell cannot format or commit its value. The grid can be told to let the exception out rather than showing its own dialog, which is what an application that does its own validation wants. |
OnHandleCreated | Raises the HandleCreated event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior. |
OnKeyDown | Raises the KeyDown event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior. |
OnMouseDown | Raises the MouseDown event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior. |
OnMouseLeave | Raises the MouseLeave event, clearing any hover highlight. |
OnMouseMove | Raises the MouseMove event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior. |
OnMouseUp | Raises the MouseUp event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior. |
OnParentChanged | Raises the ParentChanged event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior. |
OnRowEnter | Raises the RowEnter event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior. |
OnRowsAdded | Raises the RowsAdded event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior. |
OnSizeChanged | Raises the SizeChanged event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior. |
SetUpNodeControlType | Sets up the node control type for all nodes in the control - i.e. whether to set it up to support Image (default), radio button or the checkbox control. |
SortNodesByColumn | Sorts the nodes by the values in a column - siblings within their parent, at every level, collapsed ones included - or, with None, puts back the order they were built in. |
WndProc | Processes the Windows messages sent to this control's window. |
BinaryTreeListViewCellClicked | An event raised when a tree cell BinaryTreeListViewCell is clicked by the user. |
BinaryTreeListViewNodeCollapsed | An event raised when a node in the BinaryTreeListView control, has collapsed. |
BinaryTreeListViewNodeCollapsing | An event raised when a node in the BinaryTreeListView control, is about to collapse. |
BinaryTreeListViewNodeExpanded | An event raised when a node in the BinaryTreeListView control, has expanded. |
BinaryTreeListViewNodeExpanding | An event raised when a node in the BinaryTreeListView control, is about to expand. |
ItemDrag | Occurs when the user begins dragging a BinaryTreeListViewNode instance, and the property AllowDrop is set to true. |
Constructors
BinaryTreeListView
Constructs a new instance of BinaryTreeListView class.
Properties
AllowDataErrorExceptionToBeThrown
Gets or sets whether the control should allow to flow data error exceptions.
AllowUserToAddRows
Gets or sets a value indicating whether the option to add rows is displayed to the user.
AllowUserToDeleteRows
Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
AllowUserToSortColumns
Gets or sets whether clicking a column header sorts the tree by that column: ascending, then descending, then back to the order the nodes were built in.
NotSortable. Siblings are sorted within their parent, at every level, and each parent keeps its children beneath it. Handle SortCompare to compare two values yourself, as for a DataGridView's own sort. To sort from code, call SortNodesByColumn. The default is false.BuiltInCustomRenderedTargetElement
Gets or sets the target UI element (like column header cell, row header cell and row) that is to be custom drawn by the built-in renderer, by using the color properties.
UseBuiltInRendering OrientationAspectForRenderingColumnHeader OrientationAspectForRenderingRowHeader OrientationAspectForRenderingRow StartColorForRenderingColumnHeader EndColorForRenderingColumnHeader StartColorForRenderingRowHeader EndColorForRenderingRowHeader StartColorForRenderingRow EndColorForRenderingRowBusyIndicatorText
Gets or sets the busy indicator text.
BusyIndicatorTextBackColor
Gets or sets the backcolor of the busy indicator text.
BusyIndicatorTextFont
Gets or sets the font for the busy indicator text.
BusyIndicatorTextForeColor
Gets or sets the forecolor of the busy indicator text.
CellBorderColor
Gets or sets the color of the cell border.
CellBorderDrawingColor
Gets or sets the color for drawing the cell border, when the UseBuiltInRendering property is switched on, with option set to draw either Column headers or All.
CellBorderStyle values are supported: 1. Single 2. SingleVertical
3.SingleHorizontal
CellBorderWidth
Gets or sets the width of the cell border.
CellEditingMode
Custom implementation of the EditMode property.
EditMode property directly. The control performs some custom validation, etc. and hence needs to hide the base property.
CollapseImage
Gets or sets the image to be used to draw the "collapse" state of the node.
ColumnBackgroundDefaultCellStyleBackColor
Gets or sets the color of the column background default cell style back.
ColumnBackgroundOnCellSelectionColor
Gets or sets the color of the column background when a cell is selected.
ColumnBackgroundOnMouseHoverColor
Gets or sets the color of the column background on mouse hover.
ColumnHeaderBottomBorderColor
Gets or sets the colour of a hairline drawn along the bottom of the column headers, when the UseBuiltInRendering property is switched on with the option set to draw either column headers or all. Empty, the default, draws none.
ColumnSeparatorDrawingColor
Gets or sets the color for drawing the column separator, when the UseBuiltInRendering property is switched on, with option set to draw either Column headers or All.
ControlDataDisplayMode
Gets or sets whether to run the control in its tree-list or list-view mode.
CurrentNode
Returns the current active node in the control.
DepthForPreparingNodesWithChildren
Gets or sets as to how many nested levels of depth the control should read data and build nodes with its children.
DrawColumnSeparatorWhenUsingBuiltinRendering
No summary in the source yet.
UseBuiltInRendering BuiltInCustomRenderedTargetElement DrawGlassBackgroundHighlightingOnMouseEnter
Gets or sets a value indicating whether to draw "glass" background highlighting on mouse entering a row.
DrawNodeConnectingLines
Gets or sets whether to draw the lines to show connections between the nodes.
EnableAutomaticBuiltInDragDrop
Gets or sets a value indicating whether the control should enable the automatic custom built-in drag and drop feature for tree-list nodes within the control.
EnableCommitingEditWhenMovingFocusFromEditContext
Gets or sets whether the control should commit any user edits in the node, when the user clicks on the other areas in the same cell - i.e. when he clicks on the image area or the expand/collapse area in the BinaryTreeListViewCell instance.
EnableExpandCollapsingOfNodesUponMouseClickOnReadOnlyTreeListViewNodeCellOrColumn
Gets or sets whether to enable expand/collapse of nodes (that have children) when the user clicks on the node/cell when their ReadOnly property is true.
EndColorForRenderingColumnHeader
Gets or sets the end color for rendering the column header.
EndColorForRenderingRow
Gets or sets the end color for rendering the row.
EndColorForRenderingRowHeader
Gets or sets the end color for rendering the row header.
ExpandCollapseNodeOnDoubleClick
Gets or sets whether double-clicking a node's cell in the tree column expands or collapses it. The expand glyph toggles on a single click either way. The default is true.
ExpandCollapsingOfNodesLevel
Gets or sets the level at which the keyboard based nodes expanding/collapsing functionality is to work.
BinaryTreeListViewCell level. If set as Row, then if the user hits Shift + Right or Shift + Left keys when he is focused on a row/node, the treelistview node will expand or collapse respectively.
If set as TreeListViewCell, the user will have to specifically keep the focus on the treelistview cell, and then hit keys Shift + Left / Right to collapse / expand respectively.
ExpandImage
Gets or sets the image to be used to draw the "expand" state of the node.
ExpandTargetDropNodeUponDragDrop
Gets oir sets whether the control should expand all nodes in the target node location upon drag/drop drop action completing.
FrameBorderColor
Gets or sets the colour of the frame's border (see ShouldDrawFrame).
FrameBorderThickness
Gets or sets the thickness of the frame's border, in logical (96 DPI) pixels, 0 to 8.
FrameCornerRadius
Gets or sets the radius of the frame's corners, in logical (96 DPI) pixels, 0 to 32.
FrameFocusedBorderColor
Gets or sets the colour of the frame's border while the focus is in the control - on the grid or on a cell's editor. Empty keeps FrameBorderColor.
FramePadding
Gets or sets the space between the frame's border and the grid, in logical (96 DPI) pixels, 0 to 16. It is never less than the corners need to keep the grid inside them.
FrameShadowColor
Gets or sets the colour of the frame's drop shadow. Its strength is FrameShadowOpacity, so the colour's own alpha is not used.
FrameShadowDepth
Gets or sets how far the frame's shadow spreads, in logical (96 DPI) pixels, 0 to 24. A third of it is also the distance the shadow drops below the frame.
FrameShadowOpacity
Gets or sets the strength of the frame's shadow at its darkest, as a percentage, 0 to 100.
GlassBrushBottomHalfEndColor
Gets or sets the end color of the glass brush (bottom half area).
GlassBrushBottomHalfStartColor
Gets or sets the start color of the glass brush (bottom half area).
GlassBrushLinearGradientFactor
Gets or sets the glass brush linear gradient factor.
Value. The glass brush linear gradient factor.
GlassBrushTopHalfEndColor
Gets or sets the end color of the glass brush (top half area).
GlassBrushTopHalfStartColor
Gets or sets the start color of the glass brush (top half area).
HierarchicalDataSource
Gets or sets a data source object for data-binding to the tree-list view.
DataTable or DataView instance as the data source, when it is used in data-bound mode. Note that the control in its ListView/Grid mode supports many data sources.
The DataTable / DataView schema the control expects, for this feature to work is like so:
Technical detail:
There are three specific columns that need to be there in your data source, before your normal data columns appear viz.,
UID, ID, ParentID, [Your data Column1],... , [your data Column n]
The first three specific columns of data are for the purposes of the control, for it to prepare the hierarchical layout of nodes.
The specifics of these columns are like so:
UID : This is the unique ID that every single record in the data-table will have - i.e. these are IDs assigned to each node, so it will be unique across the entire tree.
ID : This is the unique ID that every single record will have have in a given tree node level -i.e. these are Unique IDs across the sibling rows within a particular level of node.
Note here how ID is different to the UID for the same node. UID makes it unique across the entire tree, but ID makes the node unique across the sibling nodes in a given node level.
This column (ID) is for future features support purposes.
Note that if you do not set the ID for a given node, it is not an issue. BUT, please add that column in your data-table, even if you don't set any value for that column for the rows (nodes for the control).
ParentID : This is the UID of the node which is the parent of a given child node. If a node does not have any parent node - i.e it is the/a top level node, then its ParentID will have to be set to -1.
Note: Please also refer to the sample DataBoundBinaryTreeListViewDemo sample project for the sample source code of this property in action.
HighlightOnlyTreeListCellDuringDragOver
Gets or sets the value as to whether to change the colors for background and/or foregroun for the entire row or just only the tree-cell, when the user is performing a drag & drop operation.
IsChildDropDownShowing
Gets or sets whether the current column that is of type BinaryTreeListViewDatePickerColumn has the date picker editor control's dropdown calender window is currently showing/displaying.
LineDrawingColor
Gets or sets the color for drawing the "nodes connecting" lines.
LineDrawingDashStyle
Gets or sets the drawing style to be used to draw the "nodes connecting" lines.
NodeImage
Gets or sets the Image for all node instances in this control.
Image property.Nodes
Gets the nodes in the control's nodes collection.
For more information of this property's usage, please refer to an example here: BinaryTreeListViewNodesCollection.Add(params object [])
NodesSortColumn
Gets the column the nodes are sorted by, or null when they are in the order they were built in.
NodesSortDirection
Gets the direction the nodes are sorted in, or None.
NodesSortOrder
Gets or sets the nodes sort order.
Value. The nodes sort order.
OptimiseLayoutRenderingDuringDragDrop
Gets or sets whether to run an optimisation for layout adjustments during drag/drop action.
OrientationAspectForRenderingColumnHeader
Gets or sets the orientation aspect for rendering column header.
OrientationAspectForRenderingRow
Gets or sets the orientation aspect for rendering row.
OrientationAspectForRenderingRowHeader
Gets or sets the orientation aspect for rendering row header.
RowSelectionBackColorDuringDragOver
Gets or sets the row/cell selection backcolor when the user is performing a drag & drop operation.
RowSelectionForeColorDuringDragOver
Gets or sets the row/cell selection forecolor when the user is performing a drag & drop operation.
RowTemplate
Custom implementation of RowTemplate property.
Rows
Custom implementation of Rows property.
ShouldDrawCellBorderWhenSelected
Gets or sets a value indicating whether the control should draw cell border when the cell is selected.
ShouldDrawColumnBackgroundUponCellSelection
Gets or sets a value indicating whether the control should draw column background upon selecting a cell.
ShouldDrawColumnBackgroundUponMouseHovering
Gets or sets a value indicating whether the control should draw column background upon mouse hovering.
ShouldDrawFrame
Gets or sets a value indicating whether the control draws its own frame: a border with rounded corners, an inner padding and, optionally, a drop shadow, all inside its bounds.
BorderStyle: switching it on sets that to None, and switching it off puts back what it was. It is painted in the control's own non-client area, so the headers, the rows, the scroll bars and the hit testing all sit inside it. Outside the border - the shadow and the rounded corners - the control paints the background colour of the nearest parent that has an opaque one. Inside it, the padding is BackgroundColor, the colour of the grid below its last row.ShouldDrawFrameShadow
Gets or sets a value indicating whether the frame casts a soft drop shadow.
ShouldEnableFastCaching
Gets or sets a value indicating whether the control should enable fast caching.
ShouldEnableLinkedRelationshipsTuning
Gets or sets a value indicating whether the control should perform linked relationships tuning.
ShowNodeImage
Gets or sets whether to show the associated node image NodeImage for each of the node instances in this control's instance.
SpecialColumnCellsToDisplayEditingControlOnCellsAlways
Gets or sets whether the special column cells (i.e. BinaryDatePicker column, BinaryComboBox column, etc.) should draw the editing control on the cell even when the cell is not in editing mode.
StartColorForRenderingColumnHeader
Gets or sets the start color for rendering the column header.
StartColorForRenderingRow
Gets or sets the start color for rendering the row.
StartColorForRenderingRowHeader
Gets or sets the start color for rendering the row header.
UseBuiltInRendering
Gets or sets whether to use built-in custom rendering for painting a desired target UI element in the control.
BuiltInCustomRenderedTargetElement.VirtualMode
Whether the grid asks for cell values as it needs them rather than holding them. Hidden from the base so that setting it repaints, which the inherited property does not do.
Methods
About
Shows the component's about box. It is here for the design-time verb and is not meant to be called from an application.
BindToTreeListView
Deterministically data binds the control (when in treelistmode) to a data source object.
- dataSource
- A
DataTableorDataViewinstance. - depth
- Lets you specify to the control as to what depth of nesting, the control should keep the nodes prepared with its children nodes. The default is 25.
ClearAllNodes
Clears all nodes in the control.
CollapseAllNodes
Collapses all the nodes in the control.
CollapseNode
Expands the given node and all its children.
CollapseNode
A helper method to enable collapsing a given node, if the given node is in expanded state.
- binaryTreeListViewNode
Dispose
Releases the resources held by this BinaryTreeListView.
- disposing
- true when called from
Dispose; false when called from the finalizer.
ExpandAllNodes
Expands all nodes in the control.
ExpandNode
Expands the given node and all its children.
- startNodeToExpand
- performDeepExpansion
ExpandNode
Helper method to perform expansion of a node, if that node contains any child nodes in it, and if it is not already in expanded state.
- binaryTreeListViewNode
GetAllSiblingsForThisNode
Gets a list if BinaryTreeListViewNode sibling objects, given a BinaryTreeListView object node.
- node
- The node whose siblings are to be retrieved.
- excludeThisNode
- If true, the siblings list returned will not inlcude the passed in node (as is in the parameter/argument), otherwise it will.
GetFlatListOfNodes
Returns a flat list of all nodes in the control.
GetFlatListOfNodes
Gets a flattened collection of all child nodes for a given node.
- startNodeWhoseChildrenCollectionAreNeededInTheList
GetNodeAt
Returns the tree node at the client point supplied.
- clientPoint
OnCellMouseDoubleClick
Raises the CellMouseDoubleClick event, and expands or collapses the node when ExpandCollapseNodeOnDoubleClick is on and the cell is in the tree column.
- e
- The data for the event.
OnCellMouseDown
Raises the CellMouseDown event, noting where a pressed column header stood, so a header that is dragged to a new place is not also taken as a click to sort.
- e
- The data for the event.
OnCellMouseEnter
Raises the CellMouseEnter event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnCellMouseLeave
Raises the CellMouseLeave event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnCellPainting
Overrides the base implementation.
- e
OnColumnAdded
Raises the ColumnAdded event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnColumnHeaderMouseClick
Raises the ColumnHeaderMouseClick event, and sorts by the column when AllowUserToSortColumns is on.
- e
- The data for the event.
OnColumnWidthChanged
Overrides the base implementation.
- e
OnDataError
Called when a cell cannot format or commit its value. The grid can be told to let the exception out rather than showing its own dialog, which is what an application that does its own validation wants.
- displayErrorDialogIfNoHandler
- true to show the built-in dialog when nothing handles the error.
- e
- What went wrong, and on which cell.
OnHandleCreated
Raises the HandleCreated event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnKeyDown
Raises the KeyDown event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnMouseDown
Raises the MouseDown event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnMouseLeave
Raises the MouseLeave event, clearing any hover highlight.
- e
- The data for the event.
OnMouseMove
Raises the MouseMove event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnMouseUp
Raises the MouseUp event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnParentChanged
Raises the ParentChanged event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnRowEnter
Raises the RowEnter event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnRowsAdded
Raises the RowsAdded event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnSizeChanged
Raises the SizeChanged event. BinaryTreeListView overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
SetUpNodeControlType
Sets up the node control type for all nodes in the control - i.e. whether to set it up to support Image (default), radio button or the checkbox control.
- controlType
SortNodesByColumn
Sorts the nodes by the values in a column - siblings within their parent, at every level, collapsed ones included - or, with None, puts back the order they were built in.
- column
- A column of this control.
- order
- Ascending, Descending, or None for the original order.
SortCompare to decide a comparison yourself: the row indices it is given are -1 for a node that is not on screen because its parent is collapsed. Nodes added after a sort are not placed by it; sort again to include them.WndProc
Processes the Windows messages sent to this control's window.
Events
BinaryTreeListViewCellClicked
An event raised when a tree cell BinaryTreeListViewCell is clicked by the user.
BinaryTreeListViewNodeCollapsed
An event raised when a node in the BinaryTreeListView control, has collapsed.
BinaryTreeListViewNodeCollapsing
An event raised when a node in the BinaryTreeListView control, is about to collapse.
BinaryTreeListViewNodeExpanded
An event raised when a node in the BinaryTreeListView control, has expanded.
BinaryTreeListViewNodeExpanding
An event raised when a node in the BinaryTreeListView control, is about to expand.
ItemDrag
Occurs when the user begins dragging a BinaryTreeListViewNode instance, and the property AllowDrop is set to true.