adamdavies
Programmer
DELETING A ROW IN DATAGRID
ASP.NET CODE
Sub DataDelete(ByVal Sender As Object, ByVal E As DataGridCommandEventArgs)
Dim deletekey As String
If dgusers.EditItemIndex = -1 Then
deletekey = dgusers.DataKeys(CInt(E.Item.ItemIndex))
Labeldescript.Text = ("Key Field " & deletekey & " Deleted"
BindSQL()
Else
Response.Write("Can't delete until editing is done!"
End If
End Sub
HTML CODE
OnDeleteCommand="DataDelete" DataKeyField="CompanyID"
No errors, it says it has removed the keyfield but still not deleting
thanks
adam
ASP.NET CODE
Sub DataDelete(ByVal Sender As Object, ByVal E As DataGridCommandEventArgs)
Dim deletekey As String
If dgusers.EditItemIndex = -1 Then
deletekey = dgusers.DataKeys(CInt(E.Item.ItemIndex))
Labeldescript.Text = ("Key Field " & deletekey & " Deleted"
BindSQL()
Else
Response.Write("Can't delete until editing is done!"
End If
End Sub
HTML CODE
OnDeleteCommand="DataDelete" DataKeyField="CompanyID"
No errors, it says it has removed the keyfield but still not deleting
thanks
adam