State BindingSource Design Time DataBinding

Topics: CAB & Smart Client Software Factory
Jul 28, 2005 at 2:06 AM
originally posted by: krijn

By sharing BindingSource objects through the State it is possible to share list positions, addNew, ... for all smartparts in a single view (or even workitem) ? Is this the right way to go ?

Question about BindingSource :
How can we use CAB in design time ? Drag & drop fields from the Data Source window add's a new dataset and a new BindingSource to every smartpart. I don't need this. How can I relink these databindings to the new datasource (datasets in state or bindingsource) ?

In short :
1. Every databinding in a control on a smartpart is bound to the same BindingSource.
2. Every smartpart contains a different BindingSource
3. Every view contains one or more smartparts
4. Data is kept into State
5. WorkItem runs, initializes smartparts
6. when smartparts are loaded I want to link the databindings to the same BindingSource object (in State). Otherwise all datarelations and datasource synchronization (AddNew,Delete, Position) is lost or doesn't work correct through the whole view.

This problem is not really related to CAB, but it would be great if someone could come up with a sort of Add-In wich creates some kind of Methods like SetBindings(dataSource as object), ClearBindings, .. or customize the DataBindings methods (generates Control.DataBindings.Add("Text",State(WorkItemSource),"Field")) through use of design functionality (drag & drop fields).

Any ideas ?