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,
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.
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
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.
just have a look at any of the samples in the samples browser, e.g. under xamPivotGrid/Data/Adomd.Net DataSource. Select any item in the DataSelector, down the hierarchy until you reach the point where an item does not have any children. The expansion indicator is still displayed, it can be toggled no exceptions occur, but I am sure viewing the sample in the debugger will trigger a binding error.
Thank you for the details. I investigated this issue and I asked our developers to research it further so I submit this as issue in our in our internal tracking system with a Development ID of 114455 and I created a support ticket for you with number CAS-93328-F5NHQV. I will provide you with more details on this through the support ticket.
Thank you for reporting this to us.
The workaround implemented by me is not correct. I saw that the TreeNodeStyle is used for the FilterFieldItemControl as well. The original IG control template is correctly implemented for the FilterFieldItemControl. It just does not correctly work for the data selector, where my workaround seems to be ok.
I duplicated the TreeNodeStyle and added my modifications to the duplicate only which I then applied to the data selector tree, leaving the FilterFieldItemControl in its original state.
Our developers are currently reviewing this issue so until they have a resolution about this I can suggest you use XamPivotGird with the default theme since the issue is not representable with it.
Hello,
The service release containing the fix for your the issue with the pivot selector is out, you can download it from: https://es.infragistics.com/my-account/keys-and-downloads/