Hi,
I've just started experimenting with Pivot Grid grid in order to add it in my product and I can say everything works fine and it's really great.
My need is to be able to add something like an ItemsSource to the filter drop down without actually having the data.
I need this because I want to pre-filter everything to reduce my bandwidth.
So if I have the filter drop down, filled with the "ItemsSource"then I need a way to get the selected values and then get my data filtered.
Is there a way to do the above?
I hope I made myself clear.
Thanks
Hello Spyros,
From the provided code snippet I can see that you are using FlatDataSource. The pre-filters are not designed to work with this type of data source. If you would like, you can suggest a product idea for including this feature for FlatDataSource as well. You can do this at http://ideas.infragistics.com/ where adder community members can vote for this idea and product management can review the inputs.
You may also have a look at the following forum thread where this issue have been discussed for some further details: http://es.infragistics.com/community/forums/t/77797.aspx
Hi Maria,
Thank you for your swift reply.
What you suggest is what I am after. I've seen in the samples browser this configuration:
Filters="[Sales Territory].[Sales Territory Country]{[Sales Territory].[Sales Territory Country].&[United Kingdom]}"
Does this apply for all FlatDataSources?
All I want is setting a predefined filter like "United Kingdom", but I can't get it to work. Everything is always selected.
This is what I'm doing in my code:
var flatData = new FlatDataSource { Cube = DataSourceBase.GenerateInitialCube("MyCube"), Rows = DataSourceBase.GenerateInitialItems("[TestRow].[TestRow]"), Columns = DataSourceBase.GenerateInitialItems("[TestColumn].[TestColumn]"), Filters = DataSourceBase.GenerateInitialItems("[TestFilter].[TestFilter]{[TestFilter].[TestFilter].&[TestFilterItem]}"), Measures = DataSourceBase.GenerateInitialItems("Value"), MeasureListLocation = MeasureListLocation.Columns, MeasureListIndex = 0, DimensionsGenerationMode = DimensionsGenerationMode.Mixed, HierarchyExpansionMode = HierarchyExpansionMode.ExpandAll, AreaFieldSettings = { AllowColumnsEditing = true, AllowFiltersEditing = true, AllowMeasuresEditing = true, AllowRowsEditing = true }, };
Spyros
Hello Spyros and thank you for posting!
I am glad that you find the XamPivotGrid control useful. The filters in the control are loaded based on the data that is loaded in the DataSource. That being said a different data could not be used only for the filters.From your descriotion it seems that you need to apply the filter on loading rather than waiting the whole data to load and then the user to apply it. If that so you may pre-set it when defining the data source. For Xmla it can be similar to the following code snippet: <igOlap:XmlaDataSource x:Key="DataSource" ServerUri="http://sampledata.infragistics.com/olap/msmdpump.dll" Database="Adventure Works DW Standard Edition" Cube="Adventure Works" Columns="[Date].[Calendar]" Rows="[Product].[Product Categories]" Filters="[Sales Territory].[Sales Territory Country]" Measures="Reseller Sales Amount" />I hope this is helpful. Please feel free to let me know if you need further assistance.