The event handler receives an argument of type BeforeRowsDeletedEventArgs containing data related to this event. The following BeforeRowsDeletedEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Cancel (Inherited from System.ComponentModel.CancelEventArgs) | |
DisplayPromptMsg | Whether to display prompt message. |
Rows | The rows (read-only) |
The rows argument returns a reference to a Rows collection that can be used to retrieve references to the UltraGridRow object or objects being deleted. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection.
The displaypromptmsg argument enables you to hide the default confirmation message. This argument can be used to display your own dialog.
The cancel argument enables you to programmatically prevent the rows from being deleted. This argument can be used to prevent the user from deleting rows unless a certain condition is met.
This event is generated when rows are to be deleted, either programmatically, or by user interaction. To prevent the user from deleting rows, set the Override's UltraGridOverride.AllowDelete property to False. Rows can be deleted programmatically by invoking either the Delete method or the DeleteSelectedRows method.
The text displayed in the default confirmation dialog can be modified by setting the DialogStrings property.
The AfterRowsDeleted event, which occurs after rows are deleted, is generated after this event, provided cancel is not set to True.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2