Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing collection property
Message
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01345879
Message ID:
01345884
Views:
8
>Hi everybody,
>
>We're using SQLWhereBuilder in our application. This class has Conditions collection. I'm looking right now in the Watch window and I see it has List and InnerList. When I expand List I see
>
>List[0]
>
>-		List	{UNLV.IAP.WebControls.SqlWhereBuilderConditionCollection}	System.Collections.IList {UNLV.IAP.WebControls.SqlWhereBuilderConditionCollection}
>
>		_fieldId	"LetterCode"	string
>
>
>My question is - how can I access this _fieldID in my code?
>
>I need to check _fieldID for some specific string, what would be my syntax?
>
>Thanks a lot in advance.

I just added this code
  for (int i=0; i < this.SqlWhereBuilderPeople.Conditions.Count; i++) 
            {
                if (this.SqlWhereBuilderPeople.Conditions[i].FieldId.Equals("IsActive"))
                {
                    // Remove IsActive part in case we selected that condition - very rare case
                    RemoveIsActivePart = true;
                }
    
            }
Don't know if there is a simpler/better method.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform