Find a row index in a dataset

G

Guest

Hello,

Does anyone know how to find the index of a row in a data table in a dataset?
The Find Method returns a data row, but to remove/delete a row from a data
table you have to supply the row index and I am not sure how to find that.
There does not appear to be an indexof or getindex property/method.

TIA
 
V

Val Mazur \(MVP\)

Chris,

Find method of the DataView actually returns index of the found row. Anyway
even if you do not have an index but have an actual DataRow, then you could
call Delete method of the DataRow and it will be deleted from the DataTable
 

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