Back to Devexpress

TreeListHitInfo.Node Property

windowsforms-devexpress-dot-xtratreelist-dot-treelisthitinfo-986dd87a.md

latest4.3 KB
Original Source

TreeListHitInfo.Node Property

Gets the node located under the test point.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
public TreeListNode Node { get; }
vb
Public ReadOnly Property Node As TreeListNode

Property Value

TypeDescription
TreeListNode

A TreeListNode object representing a node located under the test point.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Node property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-spreadsheetcontrol-api-part1/CS/SpreadsheetControl/Form1.cs#L150

csharp
TreeListHitInfo hitInfo = tree.CalcHitInfo(tree.PointToClient(Control.MousePosition));
if (hitInfo.Node != null)
{

winforms-treelist-customize-cell-tooltip/CS/Form1.cs#L26

csharp
if(hit.HitInfoType == HitInfoType.Cell) {
    object cellInfo = new TreeListCellToolTipInfo(hit.Node, hit.Column, null);
    string toolTip = string.Format("{0} (Column: {1}, Node ID: {2})", hit.Node[hit.Column], hit.Column.FieldName, hit.Node.Id);

drag-drop-grid-rows-to-treelist/CS/DragAndDropRows/Form1.cs#L93

csharp
var ht = treeList.CalcHitInfo(pt);
TreeListNode destNode = ht.Node;
if(destNode is TreeListAutoFilterNode)

winforms-spreadsheetcontrol-api-part1/VB/SpreadsheetControl/Form1.vb#L143

vb
Dim hitInfo As TreeListHitInfo = tree.CalcHitInfo(tree.PointToClient(Control.MousePosition))
If hitInfo.Node IsNot Nothing Then
    RunSelectedExample(hitInfo.Node)

winforms-treelist-customize-cell-tooltip/VB/Form1.vb#L26

vb
If hit.HitInfoType = HitInfoType.Cell Then
    Dim cellInfo As Object = New TreeListCellToolTipInfo(hit.Node, hit.Column, Nothing)
    Dim toolTip As String = String.Format("{0} (Column: {1}, Node ID: {2})", hit.Node(hit.Column), hit.Column.FieldName, hit.Node.Id)

drag-drop-grid-rows-to-treelist/VB/DragAndDropRows/Form1.vb#L91

vb
Dim ht = treeList.CalcHitInfo(pt)
Dim destNode As TreeListNode = ht.Node
If TypeOf destNode Is TreeListAutoFilterNode Then Return Nothing

See Also

Column

HitInfoType

TreeListHitInfo Class

TreeListHitInfo Members

DevExpress.XtraTreeList Namespace