Back to Devexpress

ASPxGridBehaviorSettings.ConfirmDelete Property

aspnet-devexpress-dot-web-dot-aspxgridbehaviorsettings-d8d8ae13.md

latest2.4 KB
Original Source

ASPxGridBehaviorSettings.ConfirmDelete Property

Specifies whether the Confirm Delete window is displayed before a data item (row, card, or record) is deleted.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(false)]
public bool ConfirmDelete { get; set; }
vb
<DefaultValue(False)>
Public Property ConfirmDelete As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true, to display the Confirm Delete window; otherwise, false.

|

Remarks

Set the ConfirmDelete property to true to display the Confirm Delete window before a data item is deleted. This window allows an end-user to cancel the delete operation.

Use the ASPxGridTextSettings.ConfirmDelete property to specify the Confirm Delete window’s text.

aspx
<dx:ASPxGridView runat="server" ID="Grid" Width="100%" EnableRowsCache="false" DataSourceID="DemoDataSource1" KeyFieldName="ProductID"
        OnContextMenuInitialize="Grid_ContextMenuInitialize" OnContextMenuItemClick="Grid_ContextMenuItemClick">
     ...
     <SettingsBehavior ConfirmDelete="true" EnableCustomizationWindow="true" EnableRowHotTrack="true" />
     <SettingsText ConfirmDelete="Are you sure you want to delete the row?" />
</dx:ASPxGridView>

For a full example, see Grid - Context Menu demo.

See Also

Grid View - Get Started

Card View - Get Started

Vertical Grid - Get Started

ASPxGridBehaviorSettings Class

ASPxGridBehaviorSettings Members

DevExpress.Web Namespace