Hi,
We are using XAM Data tree for Parent Child node. we have add check Box also. But when I add Item source, Field Name not showing in Parent Node. We are binding source in View Model.
In Item source I have Bind Observable collection "Menu" and fetch list of items from data base. But Nothing showing in parent Node and its child Node.
<ig:XamDataTree x:Name="MyTree" ItemsSource="{Binding Menu}" DisplayMemberPath="Menu Name"> <!-- Enable Check Boxes--> <ig:XamDataTree.CheckBoxSettings> <ig:CheckBoxSettings CheckBoxVisibility="Visible"/> </ig:XamDataTree.CheckBoxSettings> <ig:XamDataTree.GlobalNodeLayouts> <ig:NodeLayout Key="Menu_ID" TargetTypeName="Menu_ID" DisplayMemberPath="Menu_ID"/> <ig:NodeLayout Key="Menu_Name" TargetTypeName="Menu Name" DisplayMemberPath="Menu_Name"> <!-- Disable Check Boxes at the Product Level --> <ig:NodeLayout.CheckBoxSettings> <ig:CheckBoxSettingsOverride CheckBoxVisibility="Collapsed"/> </ig:NodeLayout.CheckBoxSettings> </ig:NodeLayout> </ig:XamDataTree.GlobalNodeLayouts> </ig:XamDataTree>
Thanks
Hello Pri,
I am just checking if you require any further assistance on the matter.
Hi Pri,
I believe that this issue occurs because your underlying collection is not of type array of objects.
Let me know, if you need any further assistance on this matter.
I have checked but still I am getting null value. Is there any way to select multiple Items.
<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>
Is there any mistake than please suggest us.
Yes I have checked, exactly as in your sample, SelectedDataItems property not giving selectedItems value, Its giving Null value.
And I have set SelectedDataItems property in view Model I have added Property.
private ObservableCollection<GroupMenuModel> _SelectedScrrenItems; public ObservableCollection<GroupMenuModel> SelectedScrrenItems { get { return _SelectedScrrenItems; } set { if (_SelectedScrrenItems != value) { _SelectedScrrenItems = value; OnPropertyChanged("SelectedScrrenItems"); } } }
But when I call SelectedScrrenItems its giving null value.Event in your sample I am not getting to fetch Selected Items.
Please suggest if i am wrong anywhere, your suggestion would be a appreciate for us.
You can see how exactly I have implement the same in my sample application because everything works correctly there.
I believe that you are missing something.