Hello everybody,
I am looking for a quick how-to which provides insight on enabling the grid for Cube Writeback. My cube is definitly writeback-enabled and I set all reasonable properties on the grid.
<igPivot:XamPivotGrid x:Name="pivotGrid" Loaded="pivotGrid_Loaded" DataSource="{StaticResource adomdDataSource}" AllowHeaderRowsSorting="True" AllowHeaderColumnsSorting="True" AllowDrop="True" AllowHiddingColumns="True" AllowHiddingRows="True" IsManipulationEnabled="True"> <igPivot:XamPivotGrid.EditSettings> <igPivot:EditSettings AllowCellEdit="True" EditFormatedValue="True" > </igPivot:EditSettings> </igPivot:XamPivotGrid.EditSettings> </igPivot:XamPivotGrid> <igPivot:Expander Grid.Column="1"> <igPivot:XamPivotDataSelector x:Name="dataSelector" DataSource="{StaticResource adomdDataSource}" /> </igPivot:Expander>
Setting the EditableMeasure collection happens in the Loaded event of the grid.
private void pivotGrid_Loaded(object sender, RoutedEventArgs e) { foreach (Infragistics.Olap.Data.IMeasure item in pivotGrid.DataSource.Cube.Measures.ToList()) { this.pivotGrid.EditSettings.EditableMeasures.Add(item); } }
Is there anything else I need to do/know in order to enable cube writeback in the pivotgrid?
Looking forward to your suggestions.
Thanks,
I finally managed to fill my editablemeasure collection but the update mdx doesn't get fired to the cube.
Any suggestions on this?
Hi,
the idea of CellEditing feature is that in EditableMeasures collection can be added Measures for which editing is allowed. XamPivotGrid control has two events CellEdited and CellEditing. The idea is to catch when these events are fired (editing cell that contains editable measure) and in their event handlers to implement your own logic. The control does not support the functionality automatically to update the source data. You can see how is implemented our sample with FlatData.
http://samples.infragistics.com/sldv/RunSamples.aspx?cn=pivot-grid#/pivot-grid/cell-editing
Hope that this will help you.
Regards,
Dimitrina
I am trying to download the sample but the link does'nt seem to be working. Can you provide an alternate link for the sample. This is exactly what I am looking for,
Thanks
Yousuf
Here a link to the XamPivotGrid Samples: ttp://es.infragistics.com/products/wpf/pivot-grid/
If you installed the WPF Product, you can may have the samples aready installed on your machine.
If you don't have the samples installed, you can download the installer and install the samples.
Sincerely, Matt Developer Support Engineer