Hello
my customers require to view the data in the XamPivotGrid as percentage of total, similar as in Excel where it's possible to select this option on a column and row basis. I found the following thread http://blogs.infragistics.com/forums/t/61709.aspx where IG suggests to use the PercentOfTotalAggregator, which at that time was an unsupported class for the 11.1. version of the XamPivotGrid. I hoped with version 12.1 this feature would be available, but it seems it still is not. At least I did not find any documentation on it, but the class is still there in the Infragistics.Olap namesapce.
So, I am using XamPivotGrid version 12.1.20121.1010, connecting the grid via the AdomdDataSource or XmlaDataSource, not a flat datasoure as shown in samples. I would like to provide some commands for the user to click a row or a column and switch from double values to percentages and back.
Could someone please provide some guidance on how to achieve this with AdomdDataSource/XmlaDataSource, any help is very much appreciated.
Thanks, Frank
Hi Todorthanks a lot for prompt response! It's basically exactly what I needed, however, the cells still won't get updated. I still need to collapse/expand some cells or switch to compact layout in order to see the changed cells. I checked the IG source code for "AllowCompactLayout" and it just calls PivotGrid.ArrangeLayout(), too. This is now really nagging me, I just don't get it.Anyhow, I found another solution: I use the result changed event to update the cells, exactly the same way as previously attempted in CellControlAttached, and things work now as expected.Thanks a lot for your help!Frank
Hi
You can use PivotGrid.ArrangeLayout() to enforce layout update.
Todor
Could someone please have a look at my previous question?
Asked in a more condensed way. How can I refresh the Pivot Grid in a way that its CellControlAttached event is fired, in order to intercept what's displayed in a cell, with an immediate update of the cell UI parts to reflect the changes?
Normal 0 21 false false false DE-CH X-NONE X-NONE Hi Petar
Thanks again for this info. I hope this feature request becomes a popular one then, and it will be included soon :-)
Meanwhile I was able to calculate the percentages using some of the info you suggested. However, I still have a problem with updating the grid's data.
I use the grid's CellControlAttached event to obtain a cell's data and update it according to my logic:
this.PivotGrid.DataSource.Result.Cells[rowIndex, columnIndex].SetValue(percentageVal, formattedVal, displayVal);
I added a ContextMenu to the grid which lets me trigger the different presentation modes. In a menu items' click handler, I set a "presentation mode" flag which controls how the data should be formatted in the grid cells. I then trigger the CellControlAttached event by a call to this.PivotGrid.DataSource.RefreshGrid();
The event obviously gets fired for every cell and I can see in my watch/debug window that the value was correctly updated. The UI however does not update itself. If I switch between compact layout and normal grid mode the values then are correctly displayed. I think I miss the part to trigger a repainting of the grid cells. I do not want to refresh the data source again since that would trigger CellControlAttached event again.
Would you have an idea what I am missing here?
Thanks a lot!
Frank
Hello Frank,
I have sent your Product Idea directly to our product management team. Our product team chooses new Product Ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your feature is chosen for development, you will be notified at that time. Your friendly ID for this Product Idea is PI12060013.
If you would like to follow up on your Product Idea at a later point, you may contact Developer Support management via email. Please include the reference number of your Product Idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Thank you for your request.