Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • My current example is a cashflow pivot and I'd like to use a Progress Bar as a FieldEdit to highlight the % change Variance between ThisYear and LastYear. The trick is that the progress bar should be green if: the record is Income and the Variance is positive OR the record is an Expense and the Variance is negative (ie both good things - income up or expenses down). Other Bad options would result in a red progress bar.

                                    Another requirement is that the result should look the same when printed and exported - so CustomDraw is not an option.

                                    I started out inheriting a new Progress Bar control and raising my own CustomAppearance event which lets me change the color based on the value in the control. All good except I now need to information about another field in the pivot to decide whether to be green or red (ie whether the account is income or expense).

                                    My questions are...
                                    - When my derived editor is being painted can I figure out where I am in the pivot grid and access other fields to help determine the appearance?
                                    OR
                                    - By stepping back and using the PivotGrid's CustomAppearance event instead, can I change the properties of the relevant FieldEdit control (eg Progress Bar StartColor and EndColor)?

                                    Thanks for your help.

                                0

                                Hello Brendan,

                                Thank you for the question. The easiest way to accomplish this task is to use two different RepositoryItemProgressBars to display positive and negative values. You can select which control to use via the PivotGridControl.CustomCellEdit event.

                                I've created a sample project that demonstrates this approach. You'll find it in the attachment.

                                Thanks,
                                Constant

                                0

                                Perfect thank you. Another example of your brilliant support!

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners