Hi,
We are using XAMDataTree for showing Data in Hierarchy.
<ig:XamDataTree x:Name="ScreenTree" ItemsSource="{Binding Path=ScreenMenu}" SelectedDataItems="{Binding Path=SelectedScrrenItems}" Grid.Column="4" Grid.RowSpan="6" Grid.Row="1" NodeLineVisibility="Visible" IsExpandedMemberPath="IsExpanded"> <!-- Enable Check Boxes--> <ig:XamDataTree.CheckBoxSettings> <ig:CheckBoxSettings CheckBoxVisibility="Visible" /> </ig:XamDataTree.CheckBoxSettings> <ig:XamDataTree.SelectionSettings> <ig:TreeSelectionSettings NodeSelection="Multiple"/> </ig:XamDataTree.SelectionSettings> <ig:XamDataTree.GlobalNodeLayouts> <ig:NodeLayout Key="Children" TargetTypeName="GroupMenuModel" DisplayMemberPath="Menu_Name"/> </ig:XamDataTree.GlobalNodeLayouts> </ig:XamDataTree>
But we are not getting any selected Items using SelectedDataItems property. I find the issue when we select item we are able to find items. But here We are using checkBox while only checking of Nodes Selected Items value not getting(Because in this case Items are not getting Select only they are going to checked)
So when we only checked Items, Selected Items getting Null Value.If we (Check Item + select)= In this case we are getting selected value.
Please let us aware, We have already done lots of searched.
Thanks
Hi Pri,
In the XamDataTree, a node can be checked but not selected. These are two separate states for the node. If you would like for the node to be selected when it is checked then I recommend adding a boolean property to your underlying data item which will represent whether the node is checked or not. Then inside the NodeLayout, set the IsCheckedMemberPath and the IsSelectedMemberPath to this boolean property. That way when you click on the checkbox it will set the boolean property which will in turn trigger the node to be selected.