I have a custom template for a NodeLayout in my DataTree. It has a check box and textblock. I want to bind the checkbox IsChecked property to the Node targetTypes's IsSelected property and the Content property to Node targetType's Description property. Reason for the template, is that the rest of the tree has Checkbox Mode=Auto, but these nodes should be independent.
My XAML:
<ig:XamDataTree.GlobalNodeLayouts><ig:NodeLayout Key="ItemLayout" TargetTypeName="clsItem" DisplayMemberPath="Description" IsExpandedMemberPath="IsExpanded" /><ig:NodeLayout Key="SubItemLayout" TargetTypeName="clsSubItem" DisplayMemberPath="Description"> <ig:NodeLayout.ItemTemplate><DataTemplate> <CheckBox Content="clsSubItem.Description" IsChecked="True" /> </DataTemplate></ig:NodeLayout.ItemTemplate><ig:NodeLayout.CheckBoxSettings><ig:CheckBoxSettingsOverride CheckBoxVisibility="Collapsed"/></ig:NodeLayout.CheckBoxSettings></ig:NodeLayout></ig:XamDataTree.GlobalNodeLayouts>
The SubItemCheckChanged function should have access to the node's data object, i.e. the clsSubItem object. How can I achieve this?
I tried to bind to TemplatedParent and then extract Description and IsSelected property, but then it is not independent of the rest of the tree anymore. If I click parent, this checkbox gets checked.
Chris tried to help me here, but got no response later: http://ko.infragistics.com/community/forums/t/107213.aspx
Thanks,
This question has been answered in the mentioned thread, (http://ko.infragistics.com/community/forums/t/107213.aspx).