BindValue to Another Column
- We want the
ToDate
column to automatically change to the value of theFromDate
column when ever the value of theFromDate
column changes. - To do that we'll bind the value of the
ToDate
column to the value of theFromDate
column, using theBindValue
method - Review the first overload of the BindValue method
- Note that it receives a parameter of type
TypedColumnBase<Date>
which means anyDateColumn
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 typeDateColumn
- TypedColumnBase
<Time>
means a column of typeTimeColumn
- TypedColumnBase
<Number>
means a column of typeNumberColumn
- TypedColumnBase
<Bool>
means a column of typeBoolColumn
- TypedColumnBase
<Text>
means a column of typeTextColumn
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