

On the second page, you can select the required database model – Dataset or Entity Data Model. On the first page, select the Database source type. Proceed and the same new data source dialog as you saw before appears. The wizard will pop-up a message box that tells you to re-build your solution after the data source is created and use the Wizard again to bind the control to this dataset. As you currently have no existing datasets, click the New Data Source… button to create a new one. Any existing datasets will be displayed on the page’s right side. Open the wizard and select the very first option – binding to ADO.NET Typed Dataset. Yet another way to create a data source is by using the Data Source Wizard, that can be invoked by clicking an icon in the control’s bottom-right corner. Clicking this link will invoke the standard dialog that will guide you through a few simple steps. In the drop-down menu, you can select any existing data source or click the Add Project Data Source… link to create a new one. To bind the DevExpress WinForms Data Grid control to data using ADO.NET, use the GridControl.DataSource property in the Properties grid window, or invoke the control’s smart tag and open the drop-down list next to the Choose Data Source label.

You will see how to sort or filter your data source at the BindingSource level and how to save the changes back to the database. In this tutorial, you will learn how to create a new ADO.NET data source in your WinForms project and how to bind the grid control to it with a BindingSource component. Once enabled, only one detail row will be displayed at a time.This walkthrough is a transcript of the ADO.NET Data video available on the DevExpress YouTube Channel. In this demo, this option is enabled via the “Keep a single expanded row at a time” check box. This behavior is controlled by the SettingsDetail.AllowOnlyOneMasterRowExpanded option. To get started, do the following:īind the first grid (the master grid) to the master data source and enable its SettingsDetail.ShowDetailRow option.īind the second grid (the detail grid) to the detail data source.Ĭreate the DetailRow template for the master grid and place the detail grid onto it.įinally, handle the detail grid's BeforePerformDataSelect event and specify session values.īy default, end-users can expand multiple master rows simultaneously. This demo illustrates how to visualize a simple master-detail relationship between two tables inside the GridView. 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). With the DevExpress ASP.NET GridView ( ASPxGridView), you can build master-detail layouts of any complexity - with unlimited nesting.
