Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
920
Changing Pivot Grid's ItemsSource
posted

Hi,

 

I have a XamPivotGrid that gets its data from an xml that is filtered according to a start and end date the user chooses.

So every time a user changes the start and end date i call the function that filters my xml and then change the pivot grid's ItemsSource like below:

 

ObservableCollection<MarketShares> mSharesData = SampleDataGenerator.GenerateMarketShares((DateTime)this.datepicker1.Tag, (DateTime)this.datepicker2.Tag);

((FlatDataSource)this.pivotGrid.DataSource).ItemsSource = mSharesData;

this will affect the view of the grid. Meaning that the grid will collapse and i will see the Total View only unless the user clicks to expand. I tried calling the ResultsChanged function to expand the view like below:

this.pivotGrid.DataSource.ResultChanged += DataSource_ResultChanged;

 

it worked, but the grid is being refreshed in a very obvious way where you could capture for a second the Total View being expanded. Is there a way to have the grid expanded in a less obvious way?

 

Thanks,

nazha

 

 

 

 

Parents Reply Children
No Data