Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BeginDragDropEventArgs.Data Property

Gets or sets the dragged data elements.

Namespace: DevExpress.Utils.DragDrop

Assembly: DevExpress.Utils.v24.2.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

#Declaration

public object Data { get; set; }

#Property Value

Type Description
Object

An object that specifies the dragged data elements.

#Remarks

The actual data type depends on the source control.

  • For the GridControl - an array of row handles.
    cs
    // The source control is a grid.
    int[] rowHandles = e.Data as int[];
    
  • For the TreeList - a list of nodes.
    cs
    // The source is a tree list.
    List<TreeListNode> nodeList = e.Data as List<TreeListNode>;
    
  • For the ListBoxControl - a list of list box items.
    cs
    // The source control is a list box.
    List<object> items = e.Data as List<object>;
    // If the list box is not bound to a data source (see the Items property),
    // the event argument contains string representations of data items.
    string item0 = items[0] as string;
    // If the list box is bound to a data source (see the DataSource property),
    // the actual type depends on the data source.
    DataRowView dataRowView0 = items[0] as DataRowView;
    
See Also