Arrrrgggg IBindingList!

  • Thread starter Thread starter Maxus
  • Start date Start date
M

Maxus

Hi People,

I'm implementing one of those typed collection thing that we all love
so much :) anyhows.. Problem is this I want make it use generics. So I
implement ICollection<T>, IList<T> and I think "hell yeah thats the
stuff!" So then I think "well lets add some neat data binding stuff" So
I go to add IBindingList<T> ... Gasp! its not there! Am i just being
hopless or is it really not there? and if not why not? Am I missing
something very fundamental?

Thanks for your help!
-M
 
Maxus said:
I'm implementing one of those typed collection thing that we all love
so much :) anyhows.. Problem is this I want make it use generics. So I
implement ICollection<T>, IList<T> and I think "hell yeah thats the
stuff!" So then I think "well lets add some neat data binding stuff" So
I go to add IBindingList<T> ... Gasp! its not there! Am i just being
hopless or is it really not there? and if not why not? Am I missing
something very fundamental?

I'm also not aware of the reasoning for leaving out that generic interface
(my last point of reference is beta 2, maybe something changed since
then?), but you should simply derive your collection class from
BindingList<T> if possible.


Oliver Sturm
 
Ignacio said:
Hi,

Why you want to implement that interface?
Perhaps he wants rich databinding experience, like adding new rows and
doing things while adding new rows, sending events when some object in
the collection changes etc. etc. IBindingList is essential for complex
databinding.

Frans

--
 
Hi People,

Thanks for the replies, Yep Frans is exactly right. The IBindinglist<T>
and the IBindinglistView<T> offer advanced data binding features. handy
things like sorting filter etc. Sadly my collection uses a dictionary
in it so the internal strucutre so doesn't really work with the
Bindinglist<T> collection. its very frustrating they haven't included
this. If i implement IBinding list non-generic I also have to implement
the non generic ICollection, and IList then they start to clash with
the generic verisons beacuse you cant have two this[int idex] methods
:( I cant think of anyway around it short of rebuilding the entire
class to get around it. any ideas? Do you think they will add it later?

Thanks for your help!
-M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top