8

Do you know of any datagrid-like control that also supports a treeview. Like this (but still fully WPF-stylable/templatable):

Update: UI-virtualization would be another important feature.

enter image description here

Johan
  • 74,508
  • 24
  • 191
  • 319
bitbonk
  • 48,890
  • 37
  • 186
  • 278
  • possible dupe http://stackoverflow.com/questions/1020213/c-can-i-show-an-expandable-tree-like-view-in-a-datagrid – xdumaine Mar 31 '11 at 15:43
  • @roviuser The question poster was probably satisfied with how the infragistics control can collapse groups, but AFAIK the infragistics control does not support the above behavior. – bitbonk Apr 01 '11 at 17:44
  • another possible dup - http://stackoverflow.com/questions/3457107/wpf-handle-editable-hierarchical-data-treeviewdatagrid-hybrid – xdumaine Apr 01 '11 at 17:58
  • @bitbonk were you able to implement the treeview in datagrid with any of the solutions below or by another way? – Siddhi Kamat Jul 21 '21 at 05:57

4 Answers4

5

Telerik has a TreeListView control - http://www.telerik.com/products/wpf/treelistview.aspx. It's not free, but I think it'll do what you want.

Andrew Cooper
  • 32,176
  • 5
  • 81
  • 116
1

It probably wouldn't be that hard to create your own from styling a regular DataGrid w/ Groups to look like that. The extra advantage is things like sorting and resizing columns are already taken care of.

Just style the Group Templates to contain the +/- button, folder, and group name, and change your regular DataGrid style to contain a white background with no grid lines. Even the Lines wouldn't be that hard to do if you wanted them

I always find this site useful for figuring out the different DataGrid components

Rachel
  • 130,264
  • 66
  • 304
  • 490
1

You may look over this Hierarchical Data Library or this PropertyGrid control or this DataGrig control or this xamDataGrid control.

Or Look over this TreeGridControl you may set property of colomn IsReadOnly to False and edit it to WPF(its simple).

Or you can make your own control, for example whith help of this "TreeView+DataGrid in XAML" article, in which you should change TextBlock to TextBox, and make some other changes. Or whith help of this "WPF TreeListView Control" article and comments to it.

Sonorx
  • 1,379
  • 10
  • 17
1

This control is somewhat similar to your request: http://www.obout.com/grid/aspnet_master_detail_self_reference.aspx

They also have this linked tree/grid example: http://www.obout.com/grid/tree_grid.aspx

Mark Schultheiss
  • 32,614
  • 12
  • 69
  • 100