Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use a function in a filter
Message
From
07/09/2009 19:52:44
 
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
VB 9.0
OS:
Vista
Miscellaneous
Thread ID:
01422951
Message ID:
01423004
Views:
49
>Hi, Charles, there are certain functions, though in this case, since you're using LINQ already...you could do a LINQ to DataSet query

Yeah, I am actually getting the list of keys I want to use as part of the filter doing a LINQ query. But then I have business objects (Strataframe) that have a filter property. In this case I am getting a list of keys with LINQ and then want to actually filter a BO so that the currentview is available and I can switch back to the full recordset without another trip to the backend.

I created a function that puts the keys (int32) out to a string when passed a list(of system.int32) ( I'll refactor this to generic later)

now I can
dim keystring as string = KeylistToString( selectedkeys())

bo.filter = "ikey in (" & keystring & ")"
which works fine but it just seemed it was a solution rather than the solution.. <s>


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Previous
Reply
Map
View

Click here to load this message in the networking platform