Hi Support,
I am using the XamDataTree and set the binding like this ActiveDataItem="{Binding SelectedObject, Mode=TwoWay}". The tree has several layers in hierarchy structure. When I select the child node of the tree, the binding doesn't happen and the control has a "Red Border". What I want is when select the sub child node, set the SelectedObject to null and should not show the "Red border".
Please suggest.
thanks,
Eric
Hi Eric,
Thank you for your reply. This behavior is expected because the type of your ‘ActiveDataItem’ property should be of type “object”, not “Continent”. For more information please look into the following links from our online documentation:
http://help.infragistics.com/Help/Doc/WPF/2014.2/CLR4.0/html/xamDataTree_Active_Data_Item.html#_Ref378858326
http://help.infragistics.com/Help/Doc/WPF/2014.2/CLR4.0/html/InfragisticsWPF4.DataPresenter.v14.2~Infragistics.Windows.DataPresenter.DataPresenterBase~ActiveDataItem.html
Let me know, if you need any further assistance on this matter.
Hi,
The issue could be reproduced by following changes:
public Continent ActiveDataItem { get { return active; } set { active = value; OnPropertyChanged("ActiveDataItem"); } }
Add the following as resources:
MetroDark.xamDataTree.xaml
Styles.Shared.xaml
Styles.WPF.xaml
Theme.Colors.xaml
change the margin of the XamDataTree to 3. When select sub node, you could find the red border.
I found that the XamDataGrid has the same issue.
thanks,Eric
Thank you for your post. I have been looking into your issue and no red border appears on my side. Could you please tell me whether this is some kind of your custom implementation?
I am attaching a sample application(BindingSelectedDataItem.zip) that I used for my tests.
Are you trying to make the binding valid only for the main node layout?
Looking forward to hearing from you.