public virtual bool CanDelete { get; }
Public Overridable ReadOnly Property CanDelete As Boolean
Get
public:
virtual property bool CanDelete {
bool get ();
}
abstract CanDelete : bool with get
override CanDelete : bool with get
The row being deleted is always given the first chance to deny the deletion. If the row allows it, the data list raises its DeletingRow event to let the containing form have a chance to permit or deny the deletion.
There are advantages to putting delete confirmations within the template. It has direct access to its controls so it is easier to perform any necessary validation prior to allowing the deletion. If the template is used in many forms, it also saves you from having to add an event handler for the data list's DeletingRow event in each one too.