BindValue to Another Column

  • We want the ToDate column to automatically change to the value of the FromDate column when ever the value of the FromDate column changes.
  • To do that we'll bind the value of the ToDate column to the value of the FromDate column, using the BindValue method
  • Review the first overload of the BindValue method 2017 02 26 10H17 05
  • Note that it receives a parameter of type TypedColumnBase<Date> which means any DateColumn
public class DemoLocalColumns : UIControllerBase
{
    public readonly DateColumn FromDate = new DateColumn("From Date");
    public readonly DateColumn ToDate = new DateColumn("To Date");
    public DemoLocalColumns()
    {
        ToDate.BindValue(FromDate);
    }
    public void Run()
    {
        Execute();
    }
    protected override void OnLoad()
    {
        View = () => new Views.DemoLocalColumnsView(this);
    }
} 
  • TypedColumnBase<Date> means a column of type DateColumn
  • TypedColumnBase<Time> means a column of type TimeColumn
  • TypedColumnBase<Number> means a column of type NumberColumn
  • TypedColumnBase<Bool> means a column of type BoolColumn
  • TypedColumnBase<Text> means a column of type TextColumn

See TypedColumnBase Power Point Presentation

For a deeper discussion of these topics see Lambda Expressions Generics and BindValue


Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com