ListView with Master-Detail
Description
This example shows an Xdialog form with 2 list view controls. The top control displays records from the AlphaSports invoice_header table. The bottom control displays records from the invoice_items table.
Properties
The top list box has the following interesting properties.
Variable name
vInvoiceNumber
Data Selection > Populate method
"Prepopulate from Data Source"
Data Selection > Data source
"DBF Table"
Data Selection > Table name
"invoice_header"
Data Selection > Field list
Has a selection of fields, including invoice_number
The bottom list box has the following interesting properties.
Data Selection > Populate method
"Prepopulate from Data Source"
Data Selection > Data source
"DBF Table"
Data Selection > Table name
"invoice_items"
Data Selection > Arguments
An argument named argInvoiceNumber that gets its value from vInvoiceNumber.
Data Selection > Filter/Where Clause
"Invoice_number = :argInvoiceNumber"
The effect of the argument in the bottom list box is to filter the records it displays to be the children of the parent record selected in the top list box.
Limitations
Desktop applications only.
See Also