System.Web 2.0.0.0 System.ComponentModel.CancelEventArgs

The control raises the event when a Delete button (a button with its CommandName property set to "Delete") within the control is clicked, but before the control deletes the record. This allows you to provide an event handler that performs a custom routine, such as verifying a record before deleting it, whenever this event occurs.

A object is passed to the event handler, which allows you to determine the index of the record being deleted and to indicate that the delete operation should be canceled. To determine the index of a record, use the property. To cancel the delete operation, set the property to true. You can also access the key fields and non-key fields by using the and properties, respectively. These values are useful if you want to verify the record before deleting it.

It is possible to modify the key field values in the property. If you change these values, the record that corresponds to the new key field values will be deleted.

For more information about handling events, see Consuming Events.

For a list of initial property values for an instance of class, see the constructor.

Provides data for the event.

- Constructor
  To be added.

  Use this constructor to initialize a new instance of the class.

  The following table shows the initial property value for an instance of the class.

  Property

  Initial Value

  The value of the parameter.

  This constructor is used primarily by control developers when raising events.

  Initializes a new instance of the class.

  2.0.0.0
- Property
  System.Collections.Specialized.IOrderedDictionary To be added.

  Use the property to access the values of the key field or fields for the record to be deleted. For example, you can use these values to verify the record before deleting it, to change the record to delete, or to keep a log of deleted records.

  This property contains only the key fields. To access the name/value pair values for the non-key fields, use the property.

  The property returns an object that implements the interface. The object contains objects that represent the key fields.

  As a shortcut, you can also use the indexer of the object to access the key field values. The advantage in using the indexer is that it returns key field values directly.

  This property is read-only; however, you can modify the key field values of the object it returns. If you change the key field values, the corresponding record is be deleted from the data source.

  Gets an ordered dictionary of key field name/value pairs that contains the names and values of the key fields of the deleted items.

  2.0.0.0
- Property
  System.Int32 To be added.

  Use the property to determine the index of the row being deleted. The row index is often used to retrieve the specified row from the collection of the control, which allows you to access the row's properties.

  Gets the index of the row being deleted.

  2.0.0.0
- Property
  System.Collections.Specialized.IOrderedDictionary To be added.

  Use the property to access the values of the non-key fields for the record to be deleted. For example, you can use these values to verify the record before deleting it, or to keep a log of deleted records.

  This property does not contain the key field or fields. To access the name/value pair values for the key field or fields, use the property.

  The property returns an object that implements the interface. The object contains objects that represent the non-key fields.

  As a shortcut, you can also use the indexer of the object to access the field values. The advantage in using the indexer is that it returns field values directly.

  Gets a dictionary of the non-key field name/value pairs for the item to delete.

  2.0.0.0