I tried what you have propose but unfortunately this doesn't help.
I would appreciate if you can help me with this.
I don't think the problem is with the refreshing the ItemsSource of the LocalDataSourceProvider.
I will try to explain myself better.
Suppose you have a pivot table and a refresh button. The button executes command which gathers new data for the LocalDataSourceProvider's ItemsSource and the pivotTable shows all the content as expected. All good by now.
I want to make CSV from the pivotGrid content. According to your tutorial - first I make a Workbook out of the PivotTable (GenerateWorkbook), and then I use CSVformatProvider.Export(workbook) method.
My problem is as follows:
I need that the same refresh command will make a CSV from the pivotGrid content. I want my viewModel to have a string property which contains the CSV of the pivotTable.
I succeeded to make it in 2 steps: 1- Refresh button - to make the Pivot table. 2 - One more button to make the CSV from the current Table. But it is crucial for me to manage this only by refreshing the table. But if I try to make a Workbook out of the PivotTable right after setting new Data to the provider, and before the PivotGrid is actually drawn, the GenerateWorkbook(pivotTable) function fails e.i. the table has zero rowCount and zero ColumnCount.
So how would you generate the CSV from the PivotGrid?
Thanks in advance,