Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting current row in a datatable
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Deleting current row in a datatable
Miscellaneous
Thread ID:
00981229
Message ID:
00981229
Views:
77
I have a table (System.Data.DataTable) and I have a binding manager assosiated with the table.
I have added a delete record button, but I am having problems deleting the "current" record.
Using this code I can delete the first record in the table:
this.myTable.Rows[0].Delete();
I tried using the following code to delete the "current" record:
((System.Data.DataRow) this.myBindingManager.Current).Delete();
but C# doesn't like my cast (System.InvalidCastException: Specified cast is not valid.)

Any help would be appreciated.

Thanks,
Einar
Semper ubi sub ubi.
Next
Reply
Map
View

Click here to load this message in the networking platform