Hi, I'm using the XamPivotGrid and I have a need to pop up a secondary view of my data into a XamDataGrid. The DataSource of my XamDataGrid should be the current filtered list of items in my XamPivotGrid.
Example: I have a XamPivotGrid with FlatDataSource of 1,000 items. Using the filters built into the XamPivotGrid the user filters the pivotgrid to display data that is made up of only 600 items. The other 400 were removed from the filter. Now I want to get the list of 600 items currently used by the XamPivotGrid and bind to it in the other control, XamDataGrid in this case. Any way to get the list of items currently used? Thanks!!
Hello again,
If this approach doesn’t satisfy your needs you can also try using one of these:
pivotGrid.DataRows
pivotGrid.DataSource.Result.RowAxis
which will return the DataRow of the XamPivotGrid. Also in our new version (11.2), which is slated to ship the first week of November, there will be improvements in the performance of the control. Please let me know if you need further clarifications on this matter.
Looking forward for your reply.
ok this kind of works...what i'm doing is iterating over Result.Cells and calling GetCellItemsIndexes for each cell, then calling GetRecord on the resulting indices to get all the underlying data items. However, it is much too slow to actually do this. There is hope though because going over every cell is redundant as it pulls the same underlying values multiple times when you do the total rows.
So what I should be able to do is just grab the total row and do this procedure on those cells, since those values will be made up of all cells. This should be fast, but i'm unsure how to get just the total row cells. Can you please help?
Hello,
Thank you for your post. I have been looking through it and I suggest you use this code:
xamPivotGrid1.DataSource.Result
to get the result of the XamPivotGrid and after that you can create objects with the values from the cells of that result, because it seems like there isn’t any way of binding the XamDataGrid directly to the Result of the pivot.