Hi
im trying to swap the columns and rows in a pivot grid from code behind. I found the sample, where its done in xaml. I try to reproduce it in code behind like this:
public void Swap() { try { Infragistics.Controls.Grids.PivotGridCommand command = new Infragistics.Controls.Grids.PivotGridCommand(); command.Execute(this.pivotGrid); } catch (Exception ex) { ExceptionCenter.Log(ex); } }
But the code does not do anything. What im missing?
Regards
Hi PV85281,
Instead of doing such ugly thing to try to use commanding in code behind, to achieve your goal, you can call "PivotGrid()" method for pivotgrid datasource object. Just write this line of code where necessary:
this.pivotGrid.DataSource.PivotGrid();
Thanks,
M.Yovchev