Deletes a row at the specified index.
[Visual Basic] Public Sub Delete( _ ByVal index As Integer _ ) [C#] public void Delete( int index ); [C++] public: void Delete( int index ); [JScript] public function Delete( index : int );
- The index of the row to delete.
[Visual Basic] The following example uses the Delete method to delete a row.
[Visual Basic] Private Sub DeleteRow(dv As DataView, val As String) ' Find the given value in the DataView and delete the row. Dim i As Integer i = dv.Find(val) If i = -1 Then ' The value wasn't found MessageBox.Show("Value not found in primary key column") Exit Sub Else dv.Delete(i) End If End Sub
[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button in the upper-left corner of the page.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework