Re: IBindingList AllowNew is FALSE!!!
From: Thomas Tomiczek [MVP] (t.tomiczek_at_thona-consulting.com)
Date: 11/02/04
- Next message: SB: "multi colour text in textbox"
- Previous message: Claes Bergefall: "Re: Customising datagrid"
- In reply to: Nathan Howard: "IBindingList AllowNew is FALSE!!!"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 2 Nov 2004 08:53:46 +0100
It is possible because - and now the fun starts - AddNew is called by the
binding infrastructure if the list is empty to create one intance on which
then reflection can be used to find out sub-instances.
Despite that this information should be available on an ITypedList
interface.
The added objects are then removed afterwards.
Live with it :-) It is pretty hard ,though - whoever made the databinding
architecture should be beaten.
-- Regards Thomas Tomiczek THONA Software & Consulting Ltd. (Microsoft MVP C#/.NET) (CTO PowerNodes Ltd.) --- Still waiting for ObjectSpaces? Try the EntityBroker today - more versatile, more powerfull. And something in use NOW. for the projects you have to deliver - NOW. "Nathan Howard" <NathanHoward@discussions.microsoft.com> wrote in message news:8D24803A-62BD-4A67-8809-540B7C0A807D@microsoft.com... > Hi Anyone, > > I am beyond frustrated with the .NET databinding. I have custom business > objects and collections for each which implement the IBindingList > interface > and inherit from the CollectionBase. Several of my business objects > contain > collections of other business objects up to three or four levels deep. > For > the most part they work perfectly but there is one case for which > everything > goes haywire. When my objects are bound to listboxes and the collections > are > empty the CurrencyManager keeps trying to call the AddNew method of the > IBindingList interface. I don't see how this is possible considering the > AllowNew property is set to false on all of my objects. I don't work in > datagrids so have no need to implement this portion of the interface. I > need > help... > > Thanks in advance, > Nathan
- Next message: SB: "multi colour text in textbox"
- Previous message: Claes Bergefall: "Re: Customising datagrid"
- In reply to: Nathan Howard: "IBindingList AllowNew is FALSE!!!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|