windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridhitinfo-f339de4f.md
Gets a value identifying the type of the visual element located under the test point.
Namespace : DevExpress.XtraPivotGrid
Assembly : DevExpress.XtraPivotGrid.v25.2.dll
NuGet Package : DevExpress.Win.PivotGrid
public PivotGridHitTest HitTest { get; }
Public ReadOnly Property HitTest As PivotGridHitTest
| Type | Description |
|---|---|
| PivotGridHitTest |
A PivotGridHitTest enumeration value which identifies the type of the visual element that contains the test point.
|
Available values:
| Name | Description |
|---|---|
| None |
The test point does not belong to any visual element or is outside the PivotGridControl.
| | HeadersArea |
The test point belongs to the header area.
| | Cell |
The test point belongs to a cell.
| | Value |
The test point belongs to a field value.
| | FixedLeftDiv |
The test point belongs to the left fixed line.
| | FixedRightDiv |
The test point belongs to the right fixed line.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the HitTest 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-pivot-grid-draw-a-custom-element-on-mouse-hover/CS/WindowsApplication73/Form1.cs#L62
PivotGridHitInfo info = pivotGridControl1.CalcHitInfo(e.Location);
if (info.HitTest == PivotGridHitTest.Value)
{
PivotGridHitInfo hitInfo = pivotGridControl1.CalcHitInfo(e.Location);
if (hitInfo.HitTest == PivotGridHitTest.Value && hitInfo.ValueInfo != null)
dataGridView1.DataSource = hitInfo.ValueInfo.CreateDrillDownDataSource();
winforms-pivot-grid-draw-a-custom-element-on-mouse-hover/VB/WindowsApplication73/Form1.vb#L60
Dim info As PivotGridHitInfo = pivotGridControl1.CalcHitInfo(e.Location)
If info.HitTest = PivotGridHitTest.Value Then
mousePos = e.Location
Dim hitInfo As PivotGridHitInfo = pivotGridControl1.CalcHitInfo(e.Location)
If hitInfo.HitTest = PivotGridHitTest.Value AndAlso hitInfo.ValueInfo IsNot Nothing Then dataGridView1.DataSource = hitInfo.ValueInfo.CreateDrillDownDataSource()
End Sub
See Also