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

ColumnView.RowDeleting Event

Fires when a data row is about to be deleted.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v24.2.dll

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

#Declaration

[DXCategory("Action")]
public event RowDeletingEventHandler RowDeleting

#Event Data

The RowDeleting event's data class is RowDeletingEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets whether the current event (the row deletion) needs to be canceled.
ListSourceIndex Gets the index of the current row in the data source. Inherited from RowDeletedEventArgs.
Row Gets the currently processed row. Inherited from RowDeletedEventArgs.
RowHandle Gets the row handle (id) that identifies the position of the current row in the control. Inherited from RowDeletedEventArgs.

#Remarks

To delete a row in the ColumnView, you can use the ColumnView.DeleteRow and ColumnView.DeleteSelectedRows methods. The RowDeleting event allows you to prevent row deletion. To do this, set the RowDeletingEventArgs.Cancel property to true.

See Also