windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-viewinfo-dot-gridhitinfo-a3408c4a.md
Gets a value indicating whether the test point is within the Column Header Panel.
Namespace : DevExpress.XtraGrid.Views.Grid.ViewInfo
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
public virtual bool InColumnPanel { get; }
Public Overridable ReadOnly Property InColumnPanel As Boolean
| Type | Description |
|---|---|
| Boolean |
true if the test point is within the column header panel; otherwise, false.
|
The InColumnPanel property is useful if you don’t need to determine the exact element residing under the test point and are only interested in whether the point is within the column header panel. For instance, the property can be used if you need to provide a common context menu for the column header panel regardless of which particular column header is right-clicked. If you need to obtain a particular column located under the test point, use the GridHitInfo.Column property.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the InColumnPanel 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.
GridHitInfo info = gridView.CalcHitInfo(args.Location);
if (info.InColumnPanel) return info.Column;
return null;
Dim info As GridHitInfo = gridView.CalcHitInfo(args.Location)
If info.InColumnPanel Then
Return info.Column
See Also