Log In
[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Expand]Grid View
   [Expand]View Technology
   [Expand]Data Editing
   [Expand]Filtering and Locating Rows
   [Expand]Focus and Selection Handling
   [Expand]Processing Rows
   [Expand]Formatting Cell Values
   [Collapse]Master-Detail Relationships
     Master-Detail Overview
    [Collapse]Binding to Data Specifics
      Master-Detail: DataTable Use
      Master-Detail: Using Events
      Master-Detail: Implementing Master-Detail Relationships for Custom Objects
      Implement Master-Detail Relationships for Objects Using the IRelationList Interface
      Implement Master-Detail Relationships for Objects via Collection Properties
    [Expand]View Specifics
    [Expand]Row Specifics
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
   [Expand]Batch Modifications
   [Expand]Hit Information
   [Expand]Popup Menus
   [Expand]Saving and Restoring Layouts
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Master-Detail: DataTable Use

When you bind to a data base via the BindingSource component, a DataSet with DataTable objects containing data is created. If relationships between tables are defined directly in the data base, these relationships are also set up between the created DataTable objects. If needed, you can manually define relationships between DataTables via the parent table's System.Data.DataTable.ChildRelations property, or via methods provided by the DataSet object. See MSDN to learn more.

If you bind the grid control to a System.Data.DataTable that contains master-detail relationships, or to a System.Data.DataView that refers to such a table, the grid can obtain the relationships and the only action required is to assign and customize pattern Views for representing particular relationships in XtraGrid.

See the following examples:

Expanded See Also

How would you rate this topic?​​​​​​​