Delete in DataGrid

A

Agnes

Old problem but still not solve. I got a delete button, to delete the
detail in datagrid, my datagrid is bind to stddtChg
After dsInvInfo.updatE(strTdChg) , it did nothing, all the record still in
Database. Please help

Dim cm As CurrencyManager = Me.BindingContext(dsInvInfo,
strdtChg)
cm.EndCurrentEdit()
If cm.Count <= 0 Then
Exit Function
Else
For i = 1 To cm.Count
If cm.Count > 0 Then
'cm.RemoveAt(0)
dsInvInfo.Tables(Me.strdtChg).DefaultView(0).Delete()
End If

Next
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top