Lesson 6 - Use Master-detail Data Representation in Collection Views
- 2 minutes to read
In this lesson, you will add the master-detail data representation to the CustomerCollectionView, so it displays the Customer.Orders detail collection within the GridControl.
Open the CustomerCollectionView.xaml file and run the designer. Create the following column layout in the same way as it is described in the previous lesson:
Configure the created DataControlDetail descriptor. Set its DataControlDetailDescriptor.ItemsSourcePath property to Orders and create a new GridControl to set as the DataControlDetailDescriptor.DataControl property value.
Configure the generated detail GridControl. Find its GridControl.Columns property within the Properties window and invoke the Colleciton Editor window. In the Collection Editor window, click the Add button to create a new detail GridColumn and set its ColumnBase.FieldName property to InvoiceNumber, the BaseColumn.Header property to INVOICE NUMBER, the ColumnBase.IsSmart property to True.
Proceed with creating columns for the following detail record properties: Employee.FullName, OrderDate, ShipDate, SaleAmount, ShippingAmount, TotalAmount. Click the OK button and run the application.