Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting current row in a datatable
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Deleting current row in a datatable
Divers
Thread ID:
00981229
Message ID:
00981229
Vues:
78
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform