ListView::DeleteItem Method (Int32)
.NET Framework (current version)
Deletes the record at the specified index from the data source.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
Parameters
- itemIndex
-
Type:
System::Int32
The index of the item to delete.
| Exception | Condition |
|---|---|
| InvalidOperationException | itemIndex is less than 0. -or- The DataSourceView object that is associated with the ListView control is null. |
Use the DeleteItem method to programmatically delete the record at the specified index from the data source. This method is typically used to delete a record from outside the ListView control, such as from a different control on the page. This method raises the ItemDeleted and ItemDeleting events.
.NET Framework
Available since 3.5
Available since 3.5
Show: