Normal 0 21 false false false DE-CH X-NONE X-NONE
Hello
I am using the latest WPF controls with version 12.1.20121.2002. The controls involved are the XamPivotGrid with the XamPivotDataSelector which makes use of the XamDataTree.
Both, the grid and the data selector are connected to the same XmlaDataSource. Everything works fine, Measures, Dimensions etc. can be selected and dragged and dropped to grid.
The data selector, however, shows its expansion indicator even if the associated node does not have children. Clicking the expansion indicator in such a scenario does not break anything, but during population of the data selector the following binding error is generated, for every node which does not have children:
System.Windows.Data Error: 40 : BindingExpression path error: 'HasChildren' property not found on 'object' ''HierarchicalItem' (HashCode=30884115)'. BindingExpression:Path=Node.Data.HasChildren; DataItem='XamDataTreeNodeControl' (Name=''); target element is 'ExpansionIndicator' (Name='ExpansionIndicator'); target property is 'Visibility' (type 'Visibility')
I would like to hide the expansion indicator if no child nodes are available, and as such , also get rid of the binding error. Is there a way I can modify a template? Any thoughts are welcomed, thanks a lot!
Frank
Hello Frank,
I have been researching the scenario that you reported still I am not able to reproduce the issue that you described on my side. I tested this with both XamPivotGird bound to XMLA and to flat data source. Would you provide me with a test sample where this issue is reproducible so I can continue my investigation on it.
Thanks in advance.
Hi Elena
Thanks for your response. I think I found a bug in the control template of the XamDataTreeNodeControl. I am using the Office2010Blue styles so if you look at "Office2010Blue.XamPivotGrid.xaml" and then at the style located here "<Style TargetType="ig:XamDataTreeNodeControl" x:Key="TreeNodeStyle">" you will see that control template uses this XAML for the expansion indicator:
<igPrim:ExpansionIndicator x:Name="ExpansionIndicator" IsTabStop="False" Grid.Column="1" Visibility="{Binding Node.Data.HasChildren, Converter={StaticResource boolToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" IsExpanded="{Binding Node.IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" Style="{StaticResource ExpansionIndicatorStyle1}" />
If you change the Visibility Binding to this "Visibility="{Binding Node.HasChildren, ..." everything works as expected.
I didn't have a look at the other themes because I don't use them.
Best regards, Frank
You can find our default styles for the XamPivotDataSelector on your computer in the following file:
C:\Program Files (x86)\Infragistics\NetAdvantage 2012.1\WPF\DefaultStyles\XamPivotGrid\geenric_shared.xaml
In order to change the style of the nodes you can just copy the style for XamDataTreeNodeControl in your application and change the visibility binding of the element named “ExpansionIndicator” .
If you have any additional questions on this matter please feel free to ask.