This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi I was using a number of MulticolumnTreeView controls within my application but experienced performance problems with large data sources with a large number of columns. I am currently attempting to switch the your DataGrid control as it now supports HierarchicalDataTemplate. I am experiencing two issues: 1) When I use two instances of the DataGrid using HierarchicalDataTemplates bound to different data sources I experience a binding error whereby the second instance is attempting to use the first instances data source even though the ItemSource property is bound to different objects. (I am not using any templates). 2) I am having trouble getting the DataGrid to display the children when using nested HierachicalDataTemplates as shown below: <HierarchicalDataTemplate x:Key="BlockTemplate" ItemsSource="{x:Null}" /> <HierarchicalDataTemplate x:Key="BenchTemplate" ItemsSource="{Binding Value.BlockSummaries}" ItemTemplate="{StaticResource BlockTemplate}" /> <HierarchicalDataTemplate x:Key="PitTemplate" ItemsSource="{Binding Value.BenchSummaries}" ItemTemplate="{StaticResource BenchTemplate}" /> <HierarchicalDataTemplate x:Key="TotalTemplate" ItemsSource="{Binding Value.PitSummaries}" ItemTemplate="{StaticResource PitTemplate}" /> This worked with the MulticolumnTreeView. Thanks Chris |
|
|
Hello Chris 1) I tried this out but was unable to reproduce this issue. Everything was working as expected. If you still have this issue, please send me a repro project so I can look into it further. 2) At the moment the DataGrid does not support nested hierarchical templates. This may not be added until the next WPF Elements version, but I have increased it's priority for you. Jason Fauchelle |
|
|
How do I set the Parent rows to be expanded by default? Setting the IsExpanded property to true in a DataGridCellContainer style throws a null ref exception.
|
|
|
Hello Zep I'll add an option to open the parent rows by default. Do you want to only open the top level of items?, or all parent items in all levels in the hierarchy? Jason Fauchelle |
|
|
Hi Jason Expand at all levels thanks. Chris |
|
|
Hello Chris The next nightly build will include a HierarchyMode property on the DataGrid. You can set this property to Expanded to expand all levels of the hierarchy when the items source is loaded. The next nightly build will be available at around 1200 GMT (about 11 hours from now). You can get nightly builds from the downloads page: http://www.mindscapehq.com/products/wpfelements/nightly-builds Jason Fauchelle |
|
|
Hi, thanks for adding the HierarchyMode property. I thought I'd just let you know that the DataGrid does not gracefully handle the case where the child collections in the hierarchy are null. My collections were null if they had no children and this caused a null reference exception in the DataGrid when setting HierarchyMode to Expanded. Thanks Chris |
|
|
Hello Chris Thanks for pointing this out. This bug will be resolved in the next nightly build. Jason Fauchelle |
|