| BcfHierarchicalViewManagerAddBranchBindingSourceTBindingSource Method |
[This is preliminary documentation and is subject to change.]
Namespace:
CalculationWorks.ViewModel.Forms
Assembly:
CalculationWorks.ViewModel.Forms (in CalculationWorks.ViewModel.Forms.dll) Version: 4.0.0-beta7
Syntax protected TBindingSource AddBranchBindingSource<TBindingSource>(
string name,
BcfBindingSource parent,
BcfRelation relation,
Func<BcfBindingSourceBuilder, TBindingSource> createBindingSource
)
where TBindingSource : BcfBindingSource
Protected Function AddBranchBindingSource(Of TBindingSource As BcfBindingSource) (
name As String,
parent As BcfBindingSource,
relation As BcfRelation,
createBindingSource As Func(Of BcfBindingSourceBuilder, TBindingSource)
) As TBindingSource
Parameters
- name
- Type: SystemString
An unique name for the new bindingsource. - parent
- Type: CalculationWorks.ViewModel.FormsBcfBindingSource
The parent bindingsource. - relation
- Type: CalculationWorks.BusinessModelBcfRelation
The relation. - createBindingSource
- Type: SystemFuncBcfBindingSourceBuilder, TBindingSource
TBindingSource constructor.
Type Parameters
- TBindingSource
- The type of the binding source.
Return Value
Type:
TBindingSourceTBindingSource.
Exceptions Remarks Examples [ToolboxItem(true)]
public partial class MyViewManager
{
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public BcfBindingSource MasterBindingSource { get; set; }
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public BcfBindingSource DetailBindingSource { get; set; }
public override void InitializeBindingSources()
{
MasterBindingSource = AddRootBindingSource("Master", DataSet.MasterTable, (b) => new BcfBindingSource(b));
DetailBindingSource = AddBranchBindingSource("Detail", MasterBindingSource, DataSet.MasterToDetailRelation, b => new BcfBindingSource(b));
}
}
See Also