This documentation is archived and is not being maintained.
ListView::DeleteItem Method
Visual Studio 2010
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 nullptr. |
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.
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
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: