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
440
xamDataTree inside busyindicator
posted

I have a XamDataTree inside busyindicator. The XamDataTree with checkbox visibility is true, and it binds to a Hierarchical.

<ig:XamDataTree x:Name="pgaDataTree" NodeCheckedChanged="pgaDataTree_NodeCheckedChanged" >
       <ig:XamDataTree.CheckBoxSettings>
                <ig:CheckBoxSettings CheckBoxVisibility="Visible"

                                                         CheckBoxMode="Manual"

                                                         IsCheckBoxThreeState="False" />
                 </ig:XamDataTree.CheckBoxSettings>
                          <ig:XamDataTree.GlobalNodeLayouts>
                                             <ig:NodeLayout  Key="ProblemLayout"

                                                                           TargetTypeName="Problem" 

                                                                           DisplayMemberPath="Description">
                                                           <ig:NodeLayout.ExpandedIconTemplate>
                                                                      <DataTemplate>
                                                                              <Image Style="{StaticResource CPProblemImage}" />
                                                                         </DataTemplate>
                                                            </ig:NodeLayout.ExpandedIconTemplate>
                                                            <ig:NodeLayout.CollapsedIconTemplate>
                                                                          <DataTemplate>
                                                                                    <Image Style="{StaticResource CPProblemImage}" />
                                                                           </DataTemplate>
                                                               </ig:NodeLayout.CollapsedIconTemplate>
                                               </ig:NodeLayout>
                                               <ig:NodeLayout Key="GoalLayout"  

                                                                            TargetTypeName="Goal"

                                                                            DisplayMemberPath="Description">
                                                       <ig:NodeLayout.ExpandedIconTemplate>
                                                                 <DataTemplate>
                                                                           <Image Style="{StaticResource CPGoalImage}" />
                                                                   </DataTemplate>
                                                         </ig:NodeLayout.ExpandedIconTemplate>
                                                         <ig:NodeLayout.CollapsedIconTemplate>
                                                                        <DataTemplate>
                                                                                    <Image Style="{StaticResource CPGoalImage}" />
                                                                          </DataTemplate>
                                                           </ig:NodeLayout.CollapsedIconTemplate>
                                                    </ig:NodeLayout>
                                                    <ig:NodeLayout Key="ApproachLayout"

                                                                                  TargetTypeName="Approach"

                                                                                  DisplayMemberPath="Description">
                                                          <ig:NodeLayout.ExpandedIconTemplate>
                                                                      <DataTemplate>
                                                                                    <Image Style="{StaticResource CPApproachImage}" />
                                                                       </DataTemplate>
                                                           </ig:NodeLayout.ExpandedIconTemplate>
                                                            <ig:NodeLayout.CollapsedIconTemplate>
                                                                           <DataTemplate>
                                                                                  <Image Style="{StaticResource CPApproachImage}" />
                                                                            </DataTemplate>
                                                             </ig:NodeLayout.CollapsedIconTemplate>
                                                           </ig:NodeLayout>
                           </ig:XamDataTree.GlobalNodeLayouts>
                  </ig:XamDataTree>

Here all the binding steps

1. Show busyindicator

2. Call RIA service get all item soure

3.Bind  ItemSource to xamtree

4.Hide busyindicator

The first binding is OK. Then if the user user click a button to trigger rebind the XamDataTree with updated datasoure.  The second binding, all the Nodes are disable (can not expand or select any node) Eventhough i try to enable all the nodes using below function it does not work

 private void EnableTreeNodes(bool enable, XamDataTreeNodesCollection nodes)
    {
            foreach (XamDataTreeNode node in nodes)
            {
                node.IsEnabled = enable;
                if (node.HasChildren) EnableTreeNodes(enable, node.Nodes);
            }

       }

If XamDataTree is not inside the busyindicator, everything works fine.

Please hep

Parents Reply Children