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

DataControlBase.CopyRangeToClipboard(Int32, Int32) Method

Copies values displayed within the specified range of rows/cards to the clipboard.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

#Declaration

public void CopyRangeToClipboard(
    int startRowHandle,
    int endRowHandle
)

#Parameters

Name Type Description
startRowHandle Int32

An integer value specifying the handle of the first row in the range.

endRowHandle Int32

An integer value specifying the handle of the last row in the range.

#Remarks

To copy the values displayed within selected rows, use the DataControlBase.CopySelectedItemsToClipboard method. To copy the values displayed within the specified rows/cards, use the DataControlBase.CopyRowsToClipboard method.

All of these methods do nothing if the DataControlBase.ClipboardCopyMode property is set to None.

gridControl1.CopyRangeToClipboard(gridControl1.GetRowHandleByVisibleIndex(0), gridControl1.GetRowHandleByVisibleIndex(gridControl1.VisibleRowCount - 1));  

To learn more, see Clipboard Management.

See Also