HitInfoTypeEnum Enum
Lists the values used to identify the grid element located under a specific point or this point’s position relative to the control.
Namespace: DevExpress.XtraVerticalGrid
Assembly: DevExpress.XtraVerticalGrid.v24.2.dll
Declaration
Members
Name | Description |
---|---|
None
|
A point does not belong to any defined part of the vertical grid control. More precisely, it resides outside the grid control within the region which cannot be specified by any member of the |
Empty
|
A point belongs to an empty client area of the vertical grid control. |
Row
|
A point belongs to a row. Such an area corresponds to the following elements: empty spaces followed by captions within header cells, horizontal and vertical lines between cells in adjacent rows, horizontal and vertical bars representing categories. |
HeaderCell
|
A point belongs to a row header panel cell. |
MultiEditorCellSeparator
|
A point belongs to a separator that divides cells in multi-editors rows. The separator is either a vertical line or a specific string between cells located within a combined row header (or value) cell. The separator can be dragged to resize the widths of inner cells for the multi-editor row. |
ExpandButton
|
A point belongs to the expand button residing within a parent row. Note that category rows can display two types of expand buttons, the button type depends on the control’s look and feel settings. |
HeaderCellImage
|
A point belongs to the row header image displayed within a row header cell. |
HeaderCellSortShape
|
Reserved for future use. |
HeaderCellFilterButton
|
Reserved for future use. |
ValueCell
|
A point belongs to a value cell. |
Border
|
A point belongs to the border of the vertical grid control. |
CustomizationForm
|
A point belongs to the client region of the Customization Form. |
OutLeftSide
|
A point resides outside the grid control. It is located to the left of the grid’s left edge but is still within its height boundaries. This can be used for handling a dragging operation initiated within the vertical grid control when it is necessary to determine the direction of dragging. |
OutRightSide
|
A point resides outside the grid control. It is located to the right of the grid’s right edge but is still within its height boundaries. This can be used for handling a dragging operation initiated within the vertical grid control when it is necessary to determine the direction of dragging. |
OutTopSide
|
A point resides outside the grid control. It is located above the grid but is still within its width. This can be used for handling a dragging operation initiated within the vertical grid control when it is necessary to determine the direction of dragging. |
OutBottomSide
|
A point resides outside the grid control. It is located below the grid but is still within its width. This can be used for handling a dragging operation initiated within the vertical grid control when it is necessary to determine the direction of dragging. |
HeaderSeparator
|
A point belongs to the header separator, which is a vertical line between row headers and value cells. It can be dragged to resize row header width. |
RowEdge
|
A point belongs to a row edge. A row edge is the bottom edge of the row’s header cell. It can be dragged to resize row height. |
RecordValueEdge
|
A point belongs to the right edge of the leftmost visible column representing a record. It can be dragged to resize the width of all records. |
BandEdge
|
A point belongs to the band edge, which is the right edge of the leftmost visible record. end-users can drag this edge to resize records. |
HorzScrollBar
|
A point belongs to the grid’s horizontal scroll bar. |
VertScrollBar
|
A point belongs to the grid’s vertical scroll bar. |
GripPlace
|
A point belongs to the grip of the vertical grid control. The grip place is visible if both the vertical and horizontal scroll bars are visible. |
FilterPanel
|
A point belongs to the filter panel. |
FilterPanelCustomizeButton
|
A point belongs to the filter panel‘s Edit Filter button. |
FilterPanelCloseButton
|
A point belongs to the filter panel‘s Close button. |
FilterPanelActiveButton
|
A point belongs to the button in the filter panel used to activate filtering. |
FilterPanelMRUButton
|
A point belongs to the button in the filter panel used to invoke a dropdown that contains a list of the most recently used filters. |
FilterPanelText
|
A point belongs to a string in the filter panel which represents the filter applied to the VGridControl. |
EmptyAreaLink
|
A point belongs to a link displayed in an empty grid at design time. |
RowBrick
|
A point belongs to a brick button. |
TabPanel
|
A point belongs to the tab panel in a property grid. |
Tab
|
A point belongs to a tab in a property grid. |
RecordHeader
|
|
RecordHeaderEdge
|
|
Caption
|
|
ValueCellEdge
|
|
RecordHeaderComparisonButton
|
Related API Members
The following properties accept/return HitInfoTypeEnum values:
Remarks
Use this enumeration’s members to determine which part of the vertical grid control a point referenced by specific coordinates belongs to. An object of the HitInfoTypeEnum type is returned by the VGridHitInfo.HitInfoType property of a VGridHitInfo object. The VGridHitInfo object is created by invoking the VGridControlBase.CalcHitInfo method of the VGridControl. This method requires the ptGridClient parameter (of the Point type) defining the x and y coordinates of a point within (or outside) the grid’s client area.
The following images illustrate a number of elements and enumeration values that correspond to them. For a complete list of enumeration values, please see the table below.
Example
The sample code below assumes that the application form has instances of the VGridControl and ListBox controls placed on it. The code is a handler for the MouseMove event of the vertical grid control. The handler obtains information about a point under the mouse cursor and outputs basic point characteristics as the text of the ListBox control.
Note that the point coordinates should be specified relative to the vertical grid control in order for the VGridControlBase.CalcHitInfo method to return a correctly composed VGridHitInfo object.
When this example runs, you can move the mouse cursor over the vertical grid control and identify which part of the grid is currently under the cursor. If you press a mouse button anywhere inside the grid’s client area and then move the cursor out of the grid while holding the button pressed, you can see how outlying points are defined by properties of a VGridHitInfo object.
using DevExpress.XtraVerticalGrid;
private void vGridControl1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) {
Point pt = new Point(e.X, e.Y);
// obtaining information about a point at the specified coordinates
VGridHitInfo hitInfo = vGridControl1.CalcHitInfo(pt);
listBox1.Items.Clear();
// displaying specific characteristics defined a point under the mouse cursor
listBox1.Items.Add("BandIndex: " + hitInfo.BandIndex);
listBox1.Items.Add("CellIndex: " + hitInfo.CellIndex);
listBox1.Items.Add("PtMouse: " + hitInfo.PtMouse);
listBox1.Items.Add("RecordIndex: " + hitInfo.RecordIndex);
listBox1.Items.Add("HitInfoType: " + hitInfo.HitInfoType);
}