Returning the selected value
Naturally a selection list receives an incoming parameter (the column that should be updated) and is updates it upon selecting a new value.
So in the code we need to have:
- A parameter in the Run method the is both received and updated. In this case a NumberColumn
- Another member with the same type as the parameter, that is available to all the class and not just the Run method. This member will later be updated with the selected value.
This member will have the pointer to the parameter, so whenever we update it, we actually updating the parameter as well.
- Update the member with the current row in the OnSavingRow.
So the code will look like this:
internal NumberColumn _ShipperID = new NumberColumn();
-public void Run()
public void Run(NumberColumn shipperID)
{
_shipperID = shipperID;
Execute();
}
protected override void OnSavingRow()
{
_shipperID.Value = Shippers.ShipperID;
}
Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com