Hi,
I use pivot grid without XamPivotDataSelector (Columns, Rows and Measures values are hardcoded). How to forbid deletion the pivot items (rows, columns, measures) from header areas? The way like ((DataSourceBase)pivotGrid.DataSource).AreaFieldSettings.AllowRowsEditing = false is not appropriate, because it is needed to reorder the columns using drag'n'drop.
Hello Ilya,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I handled the Columns, Rows, Measures and Filters CollectionChanging events and cancel the action. I also handled the XamPivotGrid’s PivotItemDragEnter event and change Delete action areas to None action. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Hi Stefan,
Thanks for your sample, it works good. But, I have one more question: user can drag pivot items between areas (rows and columns) in your sample, how to forbid change area for dragged item?
I have modified the sample I sent you before, so now it works as you want. Basically I added a check in for each type Rows, Columns, etc. to see if the new location is the same and if it is I canceled the operation. Please let me know if this helps you or you need further assistance on this matter.
Hello Stefan,
Your solution is appropriate for us. Thanks a lot.
--
Sincerely, Ilya
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.