Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
140
xampivotgrid can't edit cell
posted

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

Parents
  • 28950
    Verified Answer
    Offline posted

    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://www.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,
    Andrew
    Software Developer

Reply Children
No Data