.NET     Console.WriteLine( "All Things .NET" );
.NET Nerd Blog Home
7.02.2004

 
ITypedList interface (complex data binding)
Data binding to collections with ITypedList. There is not a lot of docs on this, help is scarce. Here's a dude that wrote an article on the topic.

Intro mentions:
which properties to hide/show, custom attributes, ITypedList implementation of hierarchical data.

Really complex databinding: ITypedList with weakly typed collections

Bonus -- this guy's blog also has recent info about TechEd 2004

update 01/05/2005
Some discussions around multiple BindingContext objects on a given WinForms form, led me back to searching for this article, but not sure it was discussed here.
Minimally, I figured out what I needed:

If you have multiple controls bound to the same collection, by default, they will all have the same BindingContext. This means that when you change the value of one control (say, pick an item from a dropdown), it will change the data in the related controls.

If this is NOT what you want, you need a distinct BindingContext for each control for which you want to keep separate selections. Doing this is simple:
whateverControl.BindingContext = new BindingContext();

That's it! (Works in WinForms, wouldn't vouch for this idea in WebForms, since selection changes result in PostBack's, etc.)

other keywords: databinding BindingContext


Comments: Post a Comment

Powered by Blogger