With the DevExpress ASP.NET GridView (ASPxGridView), you can build master-detail layouts of any complexity - with unlimited nesting. The GridView does not place any limits on your creativity and allows you to display detail records within its master-detail layout in a format most suitable for your business needs (including the ability to display collapsible row preview sections).
This demo illustrates how to visualize a simple master-detail relationship between two tables inside the GridView. To get started, do the following:
-
Create two ASPxGridView controls
-
Bind the first grid (the master grid) to the master data source and enable its SettingsDetail.ShowDetailRow option.
-
Bind the second grid (the detail grid) to the detail data source.
-
Create the DetailRow template for the master grid and place the detail grid onto it.
-
Finally, handle the detail grid's BeforePerformDataSelect event and specify session values.
By default, end-users can expand multiple master rows simultaneously. This behavior is controlled by the SettingsDetail.AllowOnlyOneMasterRowExpanded option. In this demo, this option is enabled via the “Keep a single expanded row at a time” check box. Once enabled, only one detail row will be displayed at a time.