May 25, 2004 tools

.NET Framework 2.0: BindingList

After spending a bunch of time with various partial IBindingList implementations, I just stumbled onto a brand new one in the Visual Studio 2005 Community Technology Preview: BindingList<T>. It’s not done yet, e.g. sorting doesn’t work, but the model is certainly what you’d want, e.g. you create a BindingList<Person>, bind it to something smart, like a DataGrid or a DataGridView, and you’re able to edit instances of your custom type or add or remove instances, as well as search or sort instances, just like you’d need a custom implementation of IBindingList for today. Very nice.