Link to home
Start Free TrialLog in
Avatar of anwarmir
anwarmir

asked on

how to delete a row from a datatable

I currently want to delete a row from a datatable. I am identiyiny the row by using the find method on a item in a listbox. Can someone tell me how i can delete the row from the datatable dtheldbatch


            Dim dr As DataRow = dtHeldBatch.Rows.Find(ListBoxPostBatch.ValueMember)
Avatar of JAMU
JAMU

Hi,

after you have identified the row u can delete it like eg.

Dim dt As New DataTable
 dt.Rows(0).Delete()

This should work fine.

--JAMU--
ASKER CERTIFIED SOLUTION
Avatar of arif_eqbal
arif_eqbal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial