This question is locked. New answers and comments are not allowed.
I need to programmatically set the DataContext, ItemsSource, and columns of a child grid within a HierarchyChildTemplate.
I have a situation where users need to select the object type and columns that will displayed in the child grid at runtime, therefore, the objects bound to the child grid are unknown at design time. Additionally, the child objects not necessarily accessible through the object type bound to the parent grid and may require the child grid’s DataContext to be set separately of the parent grid’s context.
I have been trying a variety of approaches with no usable results. Any input or suggestions are sincerely appreciated.