This tutorial will walk you through the process of displaying hierarchical data in RadGridView. It will not cover the creation of a WPF application, adding RadGridView to your UserControl or how to define columns.
If you need information on any of these topics please read the topic. The final result should look like this: Assuming that you have already created a WPF application and defined the RadGridView control, it is time to prepare the sample data for it. The sample data is represented by teams divided into divisions. First create the class that will represent a single team.
Am working on a.net 3.5/Winforms application. I need to show a datagridview with hierarchical data in the datagrid. For example, master rows will have an expand/collapse icon.and when the user clicks on a master row, it should expand and show the child row details in the grid. HierarchialDataTemplate HierarchialDataTemplate is a special subclass of DataTemplate that exists for working with hierarchical data, such as XML or a file system. The object constructs used to provide you with a friendly way to manipulate hierarchical rows in DataGridView may also add new performance issues.
Selecting the Hierarchical-Data-Grid view creates a single scrolling grid structure that contains a single parent grid containing rows from a parent data source. This parent grid then embeds a child grid below each parent row that has related records in the child data source. As you scroll the grid structure and click an expander on parent rows, any child grid containing related data source rows displays below its related row in the parent grid. You can also click the expander on an expanded child grid to collapse the grid into its parent. The parent grid provides read-only access to its data source. When the user selects the expander on a row in the parent grid, if this parent row has related child rows, a child grid displays the related rows from its child data source and provides read-only or editable access to that data source as specified by its properties. Like any grid, both the parent and its child grids allow you to page through all their rows using page selection controls on each grid.
In this way, you can page through all related child rows by paging and expanding every parent row, then paging through all the rows of each displayed child grid.
I am trying to construct a datagridview that will show a number of rows with a particular set of fields, but also allow me to show some 'subrows' ie rows that can be expanded below the parent row in question (if that parent row has these children - part of the datasoruce) the only real problem is that the expanded rows will have completely different fields(columns) is this possible with a standard datagridview in a windows form? I am presuming somehow I would have to shoehorn in a new datagridview in a row of the parent grid. We do have the Syncfusion suite which includes the gridgroupingcontrol. But after much hair pulling and other pains. I have given up on that completely.
Short answer: No. You need a custom component for this. There are a lot of good efforts out there on making a hierarchical treeview. Like in the CodeProject article or from Component One (paid). I understand you want different fields on the subnodes though, and I'm unsure to what extent these controls support that. I know FlexGrid support some customization of columns for different rows, but it will probably involve quite some manual work - databinding is not well supported.