On Aug 25, 6:44 pm, Toren Valone
<TorenVal...@discussions.microsoft.comwrote:
I have a simple datatable in a dataset and cannot figure out how to delete
the current row in the dataset/table. I have been able to hard code the
current row value to a 1, and that works deleting just the first record.
ds.Tables["inquiry_data"].Rows[1].Delete();
How do i get the current row being displayed?
Current row being displayed would be relative to the container object
(i.e. dataGridView) that's being used to display the DataTable
content, so you would need to fetch that value from the container. To
remove a row from a DataTable use the Remove or RemoveAt method off of
the Rows collection, off of the DataTable instance.
dt.Rows.Remove(myRow);