J
jehugaleahsa
Hello:
We are working on a large number of forms. The original approach was
to use the built-in data designer, type-specific DataTables and form
binding. However, we are running into various issues due to the
complexity of our forms. For instance, how do you bind to a check box
with a data table, or a radio group?
Well, I have since started making business objects that wrap around
DataRows. The business objects simply provide properties that wrap
around the DataRow data and return it in a desired format.
To maintain all my business objects, I am creating a
BindingList<MyBO>. Doing this really is frustrating since it means I
have to handle the BindingList<MyBO>.AddingNew event. Also, when I am
navigating with a DataNavigator control, I have to manually rebind all
my controls.
So I am holding a reference to a DataTable, BindingList<MyBO> and a
BindingSource that controls the BindingList. It is really confusing.
It can't be this confusing to use business objects in Windows Forms.
What am I missing that will help simplify this new approach?
Thanks for any pointers,
Travis
We are working on a large number of forms. The original approach was
to use the built-in data designer, type-specific DataTables and form
binding. However, we are running into various issues due to the
complexity of our forms. For instance, how do you bind to a check box
with a data table, or a radio group?
Well, I have since started making business objects that wrap around
DataRows. The business objects simply provide properties that wrap
around the DataRow data and return it in a desired format.
To maintain all my business objects, I am creating a
BindingList<MyBO>. Doing this really is frustrating since it means I
have to handle the BindingList<MyBO>.AddingNew event. Also, when I am
navigating with a DataNavigator control, I have to manually rebind all
my controls.
So I am holding a reference to a DataTable, BindingList<MyBO> and a
BindingSource that controls the BindingList. It is really confusing.
It can't be this confusing to use business objects in Windows Forms.
What am I missing that will help simplify this new approach?
Thanks for any pointers,
Travis