Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to access deleted rows from a datatable
Message
From
31/07/2011 11:42:36
 
General information
Forum:
ASP.NET
Category:
LINQ
Miscellaneous
Thread ID:
01519246
Message ID:
01519747
Views:
33
>Hi Bonnie.
>I changed around ny Linq statement and it seemed to work... I had the RowState selected out initially 'AS' a different field , but have changed this now and its working fine.
>Many thanks for your assistance
>regards,
>Gerard


You're welcome, Gerard ... glad I could help! =0)

~~Bonnie


>
>
>>>I am getting a DeltedRowInaccessible exception when I iterate through the output from a linq statement, where one of the rows has been deleted.
>>>
>>>How do I remove deleted rows from the table (Have used DataRowState.deleted but does not seem to work

>>
>>Hi Gerard,
>>
>>Checking for DataRowState.Deleted works ... perhaps you didn't code it correctly. Here's some sample syntax (tested and working fine):
>>
>>
>>DataRow[] rows = dsTemp.Personnel
>>    .Where(row => row.RowState != DataRowState.Deleted && 
>>                  row.IslastnameNull() == false && 
>>                  row.lastname == "Berent")
>>	.Select(row => row).ToArray();
>>
>>
>>~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform