Hello to all. I'm using a xampivotgrid with wpf, but after loading the data I can not edit them. in xaml I have AllowCellEdit = "True" but I do not make them change anyway. why ? thank you
woooooow now it works, thank you very much !!!
Hello Flavio,
I have been investigating into the ability to edit the XamPivotGrid, and currently, it sounds like you are just setting the XamPivotGrid.EditingSettings.AllowCellEdit property to true. There are a couple of other steps to allow editing though, in that you need to add the corresponding measures to the XamPivotGrid.EditingSettings.EditableMeasures collection. This is most easily done by handling the FlatDataSource’s Measures.CollectionChanged event and using code like the following:
switch (e.Action){ case NotifyCollectionChangedAction.Add: foreach (IMeasureViewModel mvm in e.NewItems) { this.pivotGrid.EditSettings.EditableMeasures.Add(mvm.Measure); } break;
case NotifyCollectionChangedAction.Remove: foreach (IMeasureViewModel mvm in e.OldItems) { this.pivotGrid.EditSettings.EditableMeasures.Remove(mvm.Measure); }
break;}
In doing the above, you should be able to then edit the cells of the XamPivotGrid. You can read further about editing the cells in the XamPivotGrid using the following online documentation article: https://es.infragistics.com/help/wpf/xampivotgrid-editingdatacells.
I have attached a sample project that demonstrates editing the XamPivotGrid cells. I hope this helps.
Please let me know if you have any other questions or concerns on this matter.
XamPivotGridEditTest.zip
Sincerely,AndrewSoftware Developer