Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting item
Message
 
 
À
21/05/2009 12:23:12
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01401166
Message ID:
01401346
Vues:
28
>>>On the MSDN forum a similar problem was manifested in some code that performed a delete on a DataTable inside a foreach loop of the DataRows of the DataTable. The suggestion there was to store the DataRow indices that you want to delete into an array and once you have chosen your targets and lleft the loop scope delete them outside the loop all at one time by looping the array.
>>>
>>>Is your code called in a loop?
>>
>>No, I call this method to delete a row from a grid on the highlighted item. I only press the Delete Menu item once.
>>
>>However, the biz object actually deletes the record from the table. Perhaps I should reverse the logic and first delete from the DataTable?
>>
>>I can show the code in Biz Object once I got my computer working - it failed yesterday and now would not want to boot up at all.
>
>
>I don't understand all the hoopla..... if your grid is bound to the datatable, delete the record from the datatable and refresh the grid....

Thanks. Not sure why did we need to call BizObj method here.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform