Let's look at the steps to understand how we can adjust the vehicle details form:
- Open the ConVMSVehicleTable form and drag the ConVMSVehicleOdometerTable table onto the Data Sources node.
- Set the Join Source to ConVMSVehicleTable and change the Insert At End property to No.
We don't want to let the user add multiple odometer settings as there should only be one per vehicle.
- Override the ConVMSVehicleOdometerTable data source's initValue method to set the VehicleId, as follows:
public void initValue(){ super(); ConVMSVehicleOdometerTable.VehicleId = ConVMSVehicleTable.VehicleId;}
- Close the code editor.
- Create a new tab page named OdometerPage ...