Brendan Tompkins [MVP]

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Entity Collection View Class?

As I'm working more and more with Entity Classes and Collections of them, I'm running into some interesting problems.  I've been able to DataBind my classes to things like DataGrids, no problem, but I'm finding myself wishing there were such a thing as a CollectionView class.  This would function like a DataView class does for DataBinding controls to DataSets.  Basically, what I need is a bind-able object that I could associate with my Entity Collections with a Filter property that would serve to show a subset of the entities in my collection that matched my view - or er... just what a DataView does, but for collections. 

I have found a reference to System.ComponentModel.CollectionView, in the Longhorn SDK, but not sure if this is the same, and well, it's Longhorn.  Does anyone know if there's anything like this that can be used today?

-Brendan


Posted 08-31-2004 10:54 AM by Brendan Tompkins

[Advertisement]

Comments

Brendan Tompkins wrote re: Entity Collection View Class?
on 08-31-2004 8:48 AM
Found this just now, "Sorting the Unsortable Collection - by Rockford Lhotka" It doesn't cover exactly this, but does hint in the right direction - binding to a View wrapper class.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/html/vbnet01272004.asp
Tim Weaver wrote re: Entity Collection View Class?
on 08-31-2004 9:40 AM
I'd like to see something like this as well. In fact, while I'm asking <G> adding in Roy's <a href="http://weblogs.asp.net/rosherove/archive/2004/08/31/222948.aspx">binding wih attributes</a> stuff to it would really be slick.

I'm going to have to dedicate some time to both of these and see if I can come up with something that looks reasonable.
Brendan Tompkins wrote re: Entity Collection View Class?
on 08-31-2004 9:47 AM
Nice Tim!

Add a Comment

(required)  
(optional)
(required)  
Remember Me?