Using the generic SelectionList utility
Creating a selection list controller for every time it is required can sometimes be tidious / monotonous.
So we have created a useful utility in the ENV.Utilities namespace called SelectionList.
In order to use it you need to:
- Remove the previous call to the SelectShippers controller in the _Expand method in the code behind the view
- Define a variable for the Shippers entity
- Call the Show method of the SelectionList utility, sending it 4 parameters:
- The column from the controller, in this case the Orders.ShipVia
- The Shippers entity variable
- The code column, ShipperID
- The description column, CompanyName
The code will look like this:
private void txtShipVia_Expand()
{
- new SelectShippers().Run(_controller.Shippers.ShipperID);
var Shippers = new Models.Shippers();
ENV.Utilities.SelectionList.Show(_controller.Orders.ShipVia, Shippers, Shippers.ShipperID, Shippers.CompanyName);
}
This is the result:
Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com