I am evaluating the xamPivotGrid and am running into a problem setting up the xmla data source in Xaml. If I define the data source as follows then the grid connects and shows data.
<ig:XamPivotGrid Name="xamPivotGrid1"> <ig:XamPivotGrid.DataSource> <olap:XmlaDataSource ServerUri="http://localhost/olap/msmdpump.dll" Database="DB" Cube="DBCube" Columns="[Grade].[Grade]" Rows="[Commodity].[Commodity]" Measures="Weight"/> </ig:XamPivotGrid.DataSource> </ig:XamPivotGrid>
However, I want the ServerUri, Database and Cube to be based on the values passed in via the Application.Current.InitParams collection of Silverlight, and I want to bind to these values.
I have a class that I can bind to that returns the Application.Current values for the properties I am interested in, and when I bind to them on a textbox I see the value I excpect.
<TextBox Text="{Binding Source={StaticResource OlapServerUri}, Converter={StaticResource App}}"/>
this will display http://localhost/olap/msmdpump.dll in the textbox. However, if I try the following for the data source on the pivot grid the silverlight page will not load.
<ig:XamPivotGrid Name="xamPivotGrid1"> <ig:XamPivotGrid.DataSource> <olap:XmlaDataSource ServerUri="{Binding Source={StaticResource OlapServerUri}, Converter={StaticResource App}}" Database="DB" Cube="DBCube" Columns="[Grade].[Grade]" Rows="[Commodity].[Commodity]" Measures="Weight"/> </ig:XamPivotGrid.DataSource> </ig:XamPivotGrid>
I dont understand what the issue could be here. If the binding works for the text field of the text box, why doesnt it work for the ServerUri property? Is there something Im missing?
Cheers
Hi,
The ServerUri property is not dependency property. That is why the binding does not work.
As a workaround you can set the property in code behind.
Todor.
Ok.I have the code behind working. Thanks for the information.
On a side note do you know if there are plans to include export and print functionality into the xamPivotGrid?
About export we plan to include this feature in 11.1 release.
About printing we plan it for 11.2
RegardsTodor
is printing ready ?