DataViewBase.GetColumnByTreeElement(DependencyObject) Method
In This Article
Returns a column whose cell contains the specified tree element.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v24.2.Core.dll
NuGet Package: DevExpress.Wpf.Grid.Core
#Declaration
public ColumnBase GetColumnByTreeElement(
DependencyObject d
)
#Parameters
Name | Type | Description |
---|---|---|
d | Dependency |
The element contained within the column. |
#Returns
Type | Description |
---|---|
Column |
A Column |
#Remarks
private void grid_MouseMove(object sender, System.Windows.Input.MouseEventArgs e) {
GridColumn column = grid.View.GetColumnByTreeElement(e.OriginalSource as DependencyObject);
if (column != null) {
// ...
}
}
To learn more, see Accessing and Identifying Columns.
See Also