Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
240
How to expand nodes in XamDataTree after ItemsSource is set ?
posted

Hi, I’m trying to expand all nodes in XamDataTree after ItemSource is set by ViewModel.  ViewModel calls  UpdateOnData() :

public void UpdateOnData()

{

     SetNodeExpandedState (ReconRunsTree.Nodes, true);

}

private void SetNodeExpandedState (IEnumerable<XamDataTreeNode> nodes, bool expand)

{

     foreach (XamDataTreeNode item in nodes) // ??? nodes collection is empty

     {

          item.IsExpanded = expand;

          this.SetNodeExpandedState(item.Nodes, expand);

     }

}

The problem is – Nodes collection is empty, even though ItemsSource is set properly. At which point after ItemsSource is set, the Nodes collection becomes populated ?

Parents Reply Children
No Data