Hello,
I'm trying to detect layout changes made by end users in a Pivot Grid.
Therefore I'm using the FieldAreaChanged and FieldFiterChanged Events of the Pivotgrid. But I can't find a "FieldSortOrderChanged" Event and at the moment I can't find a suitable solution to react on sortorder changes to fields (asc or desc sorting).
I just want to inform the user that a layout-change has made and the layout should be saved prior to leaving the form.
Using the GridLayout Event is not suitable because it fires much to often.
Regards,
Sven
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello Sven,
The easiest way to accomplish this task is to create a custom PivotGrid descendant and implement the required capability manually. You can raise an event from the PivotGridViewInfoData.OnSortOrderChanged method.
public class MyPivotGridControl : PivotGridControl { public MyPivotGridControl() : base() { } public MyPivotGridControl(PivotGridViewInfoData viewInfoData) : base(viewInfoData) { } protected override PivotGridViewInfoData CreateData() { return new MyPivotGridViewInfoData(this); } } public class MyPivotGridViewInfoData : PivotGridViewInfoData { public MyPivotGridViewInfoData() : base() { } public MyPivotGridViewInfoData(IViewInfoControl control) : base(control) { } public override void OnSortOrderChanged(PivotGridFieldBase field) { base.OnSortOrderChanged(field); } }
Thanks,
Constant
Hi Constant,
thank you for your fast reply. I implemented the mentioned class and changed my PivotGrid to the newly created class.
But sorry, I'm no C#-Expert, but I'm unsure where to exactly put my Code in case of an fired event.
Can you help me out a bit?
Regards,
Sven
Hello Sven,
I have created a sample project that demonstrates how to accomplish this task. You will find it in the attachment.
Please feel free to contact us if you need any additional assistance in this regard. We will be happy to help you.
Thanks,
Constant
Hi Constant,
thank you for your input. Works perfect!
Regards,
Sven
You are always welcome, Sven
Thanks,
Constant