Jump to content

egroups

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. egroups

    LiveBinding at runtime

    I tryed Bind(srcViewModel.Container,'DataSource',dstDBGrid,'DataSource'),no error,but DataSource not binded,DBGrid.DataSource not Assigned. In srcViewModel I call TBindings.Notify(self,'Container'); //nothing TBindings.Notify(self,'Container.DataSource'); //nothing
  2. Hello, I tryed generate LiveBindings by Code. I am used from example this code procedure Bind(const Source: TObject; const SourcePropertyName: string; const Target: TObject; const TargetPropertyName: string); var lSrcProperty,lDstProperty:string; lAssocInput,lAssocOutput:IScope; lManaged:TBindingExpression; begin lAssocInput:=TBindings.CreateAssociationScope([Associate(Source,'Src')]); lAssocOutput:=TBindings.CreateAssociationScope([Associate(Target, 'Dst')]); lSrcProperty:='Src.'+ SourcePropertyName; lDstProperty:='Dst.'+ TargetPropertyName; lManaged:=TBindings.CreateManagedBinding( [lAssocInput],lSrcProperty, [lAssocOutput],lDstProperty, nil, nil,[coNotifyOutput]); BindingExpressions.Add(lManaged); end; This is OK if I used for example: Bind(srcViewModel,'String',dstEdit,'Text') Bind(srcViewModel,'Number',dstEdit,'Text') Bind(srcViewModel,'Boolean',dstCheckBox,'Checked') But I have srcViewModel.Container.DataSource and on form DBGrid (I NEED DBGrid). When I Use Bind(srcViewModel,'Container.DataSource',dstDBGrid,'DataSource') is OK,but when I use TBindings.Notify application says DBGrid don't have property DataSource. Why? What problem when I binding DataSource to DataSource?
  3. Do you have any framework for dynamically create forms?
  4. egroups

    IDE Clipboard History Quick Access

    Super
×