Data ListDelete Row Method
This can be used as an alternative to the Delete button to delete a row from the list
Definition
Namespace: EWSoftware.ListControls
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
True if the row was deleted, false if not deleted due to cancellation
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
C#
public bool DeleteRow(
int delRow
)VB
Public Function DeleteRow (
delRow As Integer
) As BooleanC++
public:
bool DeleteRow(
int delRow
)F#
member DeleteRow :
delRow : int -> bool Parameters
- delRow Int32
- The row to delete
Return Value
BooleanTrue if the row was deleted, false if not deleted due to cancellation
Remarks
This is equivalent to clicking the Delete button but it allows you to put a button on
each row's template, or in the header or footer template, or handle the delete operation in some
other fashion. The specified row's CanDelete method is called and, if
it allows the delete to continue, the DeletingRow event is fired prior to deleting the
specified row. If the template will allow the deletion and the DeletingRow event is not
canceled, the specified row is deleted and the DeletedRow event is fired.
Exceptions
| NotSupportedException | This is thrown if there is no row template defined or if deletions are not currently allowed as defined by the current AllowDeletes property setting. |
| ArgumentOutOfRangeException | This is thrown if the specified row is outside the bounds of the list or if there is no data source. |