ListView with Master-Detail

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. [Picture]

The top list box has the following interesting properties.

Property

Value

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.

Property

Value

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.

See Also

List View Style Xdialog

Supported By

Alpha Five Version 7 and Above

Limitations

Desktop applications only.