OT: AddNew in DataNavigator doesn't show if you use a factory method to create new objects

OT: AddNew in DataNavigator doesn't show if you use a factory method to create new objects

Old forum URL: forums.lhotka.net/forums/t/2824.aspx


LiteWait posted on Friday, May 04, 2007

I am looking at an old article http://www.15seconds.com/issue/040614.htm
written by Rockford and I see in his example the business object he creates uses a factory method to create new instances.  To learn more I was trying to create my own business object and use this pattern to bind some controls.  I also create a BindingList<T> of the business object so I can have a data navigator created for me.  However, I notice if there is no default (private) constructor. the data navigator hides the "add new" button.   I just need to clarify why someone would use a factory pattern for business objects and how they would reconcile this with things like the data navigator?

LiteWait replied on Friday, May 04, 2007

    I am dork.  .AllowNew = true :-)

Copyright (c) Marimer LLC