Hi,
I am working on xamDataTree and facing a problem, I want to set the Checkbox Visibility of the inner Nodes based on a condition (i.e. if the EntityInformation.CheckBoxEnable property is "false" then I dont want to display the checkbox).
But when I am trying to do like
<ig:CheckBoxSettingsOverride CheckBoxVisibility="{Binding Data.EntityInformation.CheckBoxEnable, Converter={StaticResource boolToVisibilityConverter}}"/>
I am getting following error
A 'Binding' cannot be set on the 'CheckBoxVisibility' property of type 'CheckBoxSettingsOverride'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.
Please help me to acheive the functionality.
Hi Petar,
I tried with the example Everything is working fine with an exception.
Problem is that if "All the child Nodes are not available then I need to make the Parent node Check Box also Invisible"
Like in the snapshot attached, You can see if all the Trucks are not available then I need to Hide the checkBox for "TruckLayout"
Please help me to hide that one also other things are working fine
Hi again,
Here is a small sample project (DataTree_checkBox_Binding.zip), that does what Darrell suggest in the thread I mentioned I my previous reply. I have copied the original template for the XamDataTreeNodeControl, along with its needed resources (brushes, converters, etc…), and have modified the Binding of its inner CheckBox element to:
Visibility="{Binding Node.Data.IsAvailable, Converter={StaticResource BoolToVis}}"
where IsAvailable is a bool property of my underlying MenuItem class.
Please let me know if I can be of any further assistance on the matter.
First of all, Thanks for your response.
Can you please post a sample project so that I can understand what you were trying to say. I am not sure How can I use XamDataTreeNodeControl.
And yes, I am having a property (of type bool ) in the underlying data object, based on that property only I want to set the Visibility of the check box.
Waiting for your reply....Thanks once again...
I am using MVVM
Hello,
I have been looking into your issue and I am not completely sure what you need. If you want to have some of the ChecBoxes show and some of them not, binding to the CheckBoxVisibility property won’t work as it sets the visibility for all nodes in the layout. If you have a proeprty in your underlying data objects, I can suggest looking through this forum thread that discusses the same thing: http://ko.infragistics.com/community/forums/t/65140.aspx
Please let me know if you require any further clarification on the matter.
I am attaching a project and Image for better understanding
If you need a Test Project please let me know I can send that also.
Waiting for a solution...