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

ClipboardRowPastingEventArgs.PasteMode Property

Gets or sets whether only valid rows or all rows are pasted to the control.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v24.2.dll

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

#Declaration

public RowPasteMode PasteMode { get; set; }

#Property Value

Type Description
RowPasteMode

A value that specifies whether only valid rows or all rows are pasted to the control.

Available values:

Name Description
Default

The same value as OnlyValidRow.

OnlyValidRow

Only valid rows are pasted. Invalid rows are skipped.

Force

Forces the control to paste a row, even if the row contains invalid data.

#Remarks

By default, only valid rows are allowed to be added to the target control. A valid row is the one that contains only valid values. Invalid rows are skipped. You can check the validity of rows and individual cells with the ClipboardRowPastingEventArgs.IsRowValid and ClipboardRowPastingEventArgs.IsValueValid methods.

To force the pasting of rows that are considered invalid, set the PasteMode property to Force.

Values of all rows are pasted using the ColumnView.SetRowCellValue method. See Modify and Validate Cell Values to learn more.

See Also