[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Collapse]Navigation Controls
   [Collapse]Accordion Control
     Getting Started
    [Expand]Accordion Items
    [Collapse]Data Binding
      Children Path
      Children Selector
      Hierarchical Data Template
     Expanding and Collapsing
     Searching
     Selection
     View Mode
     Collapse Mode
    [Expand]Visual Elements
    [Expand]Examples
   [Expand]Breadcrumb Control
   [Expand]Navigation Bar
    Office Navigation Bar
    TileNav Pane
    Tile Bar
   [Expand]Wizard Control
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Children Selector

This topic describes how to bind the AccordionControl to data if your data source contains objects of different types.

The table below shows the required properties:

Member Description
AccordionControl.ItemsSource Specifies the path to a collection of accordion items.
AccordionControl.ChildrenSelector Allows choosing the item's children based on custom logic.

Complete the following steps to configure the binding:

  1. Specify the AccordionControl.ItemsSource property to bind the AccordionControl to data:

  2. Create a class that implements the IChildrenSelector interface and assign its instance to the AccordionControl.ChildrenSelector property:

  3. Create a data template for each data source type to display the required information in accordion item headers:

The image below shows the result:

Expanded Example

Is this topic helpful?​​​​​​​