Gets an object containing information about the dragged header’s current position.
NuGet Package: DevExpress.Win.Grid
A DevExpress.XtraGrid.Dragging.PositionInfo descendant.
If a column header is being dragged within a Grid View, DropInfo returns a DevExpress.XtraGrid.Dragging.ColumnPositionInfo object. For columns in Banded Grid Views and Advanced Banded Grid Views, the DropInfo property returns DevExpress.XtraGrid.Dragging.BandedColumnPositionInfo and DevExpress.XtraGrid.Dragging.AdvBandedColumnPositionInfo objects respectively. If a band is being dragged, the property returns a DevExpress.XtraGrid.Dragging.BandPositionInfo object.
To determine whether the View allows you to drop the header at the current position, read the DropInfo object’s Valid property.
If a column header is being dragged, you need to use the DragInfo object’s Index and InGroupPanel properties to identify the current header’s position. The following combinations are available:
- The Index property value is negative. This means that the header is over the Customization Form.
- The Index property value is non-negative and the InGroupPanel property value is true. This means that the column header is over the group panel. The Index property indicates which value will be assigned to the column’s GridColumn.GroupIndex property if dropping at the current position.
- The Index property value is non-negative and the InGroupPanel property value is false. This means that the column header is over the Column Header Panel. If dragging within a Grid View, the Index property corresponds to the column’s GridColumn.VisibleIndex property and thus, identifies its potential position. If dragging within a Banded Grid View you will additionally need the Band property to identify the column’s potential owning band. Finally, when dragging within an Advanced Banded Grid View you should ignore the Index property and use the RowIndex and ColIndex properties instead.
Index properties. These properties allow you to identify the band collection to which the band will be inserted if dropped, and its index/position within the collection.
Index property can also return negative values. See the table below for details:
|-1||The band is in its original position.|
|-100||The band is outside the band collection and outside the Customization Form. The band will be hidden if dropped.|
|-101||The band is under the Customization Form. The band will be hidden if dropped.|