Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RowFilter error when no rows match condition
Message
From
14/02/2009 10:56:55
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01380711
Message ID:
01381755
Views:
22
>I am trying to use the DataTable.Dataview.RowFilter with users selecting from a variety of criteria and the program building the RowFilter expression. When the filter conditions results in no matching rows, I get a System.IndexOutOfRange exception. What do I need to do to trap this error? Thanks.
>
>Nevermind. I found what I needed. I set the DataTable.DataView.RowStateFilter to DataViewRowState.ModifiedCurrent and that eliminated the error.



That's an interesting solution Linda. How were you using your DataView? By that I mean, what control(s) was it bound to? I'm just curious ...

~~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