How do I delete a row from table and database (Windows Forms .Net)?
Posted on 2011-03-15
I'm new to Windows Forms and .Net programming with database access.
I'm trying just a single form with some textboxes on it and a simple table.
There's a table opened with several rows.
In my form I have a bindingSource, a tableAdapter and a DataSet.
After reading here and there, I found that I need this 5 lines in order to delete a row!!
DataRowView drv = (DataRowView)bindingSource1.Current;
MyDataSet.TestRow row = (MyDataSet.TestRow)drv.Row;
Is there any simpler approach? I mean, less lines.