Back to Devexpress

BeforeItemDropEventArgs.TargetIndexInGroup Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-tile-dot-beforeitemdropeventargs-a998753c.md

latest2.7 KB
Original Source

BeforeItemDropEventArgs.TargetIndexInGroup Property

Gets the position at which the current item is about to be dropped within the target group.

Namespace : DevExpress.XtraGrid.Views.Tile

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
public int TargetIndexInGroup { get; }
vb
Public ReadOnly Property TargetIndexInGroup As Integer

Property Value

TypeDescription
Int32

A zero-based position of the tile within the target group.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the TargetIndexInGroup 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-grid-reorder-tileview-cards-sql/CS/Reorder/Form1.cs#L37

csharp
// Skip the TargetIndexInGroup - this index must belong to the dragged card
int index = n >= e.TargetIndexInGroup ? n + 1 : n;
view.SetRowCellValue(rowHandle, column, index);

winforms-grid-reorder-tileview-cards-sql/VB/Reorder/Form1.vb#L34

vb
' Skip the TargetIndexInGroup - this index must belong to the dragged card
Dim index As Integer = If(n >= e.TargetIndexInGroup, n + 1, n)
view.SetRowCellValue(rowHandle, column, index)

See Also

BeforeItemDropEventArgs Class

BeforeItemDropEventArgs Members

DevExpress.XtraGrid.Views.Tile Namespace