Apologies for the vague title but I don't know what this behaviour is called.
This is another issue we've found converting our Silverlight App to WPF. The Silverlight doesn't exhibit this behaviour and the person who implemented this code has since left the company so I can't ask them any questions.
I have a pivot grid with different types of tenders for different stores. It shows the amount of each tender and the totals for each tender, each location and the grand total:
However when I select on the totals:
and then deselect the total this happens:
It multiplies the tender by the number of tenders and copies it into each tender. Each time I click it does the same again.
It's worse if I select the the grand total as it multiplies twice.
What do I need to turn off or override in the pivot grid to stop this happening?
Hello Chris,
I have been investigating into the behavior you are seeing, and this behavior is not a default behavior of the XamPivotGrid, which leads me to believe that either we are testing against different versions or there is something specific to your application that is causing this behavior.
I have tested this using our various samples for the XamPivotGrid within the Infragistics for WPF Samples Browser version 2020.1 and I cannot seem to reproduce the behavior you are seeing in any of the samples that I have tested there. As such, I have a few questions for you on this matter.
1. What version of Infragistics for WPF are you using?
2. Do you have an isolated sample project you can share where this behavior is reproducible?
Please let me know if you have any other questions or concerns on this matter.
Andrew,
Thanks for the reply.
1. We're using version 20.1.20201.9
2. I'll look at creating an isolated sample but if you say it's not the default behaviour then I might not be able to get a reproducible case that easily as we do have application specific code and have more than likely changed the behaviour. In Silverlight the totals cells aren't selectable at all, whereas in WPF I can put the cell into some sort of edit mode - albeit read only as you can see from the second screenshot.
Is there any way I can prevent the totals cells being selected? This is the ideal solution to the problem.
As I mentioned I've inherited this code from someone I can't now contact. If this is something that's caused by something we're doing what events should I be looking for that fire when the totals cells are clicked?
I tried adding a CellEditing event handler and cancelling the edit if one of the totals cells was selected:
if (e.Cell.DataColumn.IsTotal || e.Cell.DataRow.IsTotal) { e.Cancel = true; }
but that just appeared to lock the cursor in the totals cell. I couldn't then click on any other cell in the grid.
Chris.