Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • In unit "cxGridCustomTableView.pas", class "TcxCustomGridTableViewStyles", there are various methods for returning style parameters, e.g.

                                    GetCellContentParams
                                    GetDataCellParams
                                    GetDataCellContentParams

                                    These are all virtual methods which I have successfully overridden in decendant classes.

                                    However, the method called "GetSelectionParams" is not virtual. Please can you considermaking it virtual?

                                    "GetDataCellParams" calls both "GetSelectionParams" and "GetDataCellContentParams". One is virtual the other is not. I have worked around this by overriding "GetDataCellParams" and duplicated your code but it would be good if you could make "GetSelectionParams" virtual in the future.

                                    Thanks.

                                0

                                Hi,

                                Would you mind if we make this suggestion public, so that other customers could vote for it?

                                Thanks,
                                Alex

                                0

                                Hi Alex

                                Yes, that's fine.

                                Regards

                                Michael

                                0

                                Michael, please clarify the task you're trying to accomplish by overriding the GetSelectionParams method. Making this method virtual is not a problem; however, due to its peculiarities first of all we'd like to examine your task to make certain that overriding the method is necessary.

                                Thanks,
                                Alex

                                0

                                Hi Alex

                                We introduced a new TableView event which indicates if a cell is enabled or not. Various factors can affect this at run-time. If a cell is NOT enabled, we change the colour of the cell to the disabled colour which indicates the cell cannot be edited.

                                This behaviour must override the built in styles.

                                Therefore, we override "GetDataCellContentParams" (and want to override "GetSelectionParams") to call our event and determine the enabled state before the style is set.

                                For example:

                                inherited;
                                AEnabled := <Call Event to determine enabled state based on ARecord and AItem)
                                if not AEnabled then AParams.Color := <UseDisabledColor>;

                                Regards

                                Michael

                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.

                                To start a chat you should create a support ticket


                                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.

                                Your Privacy - Legal Statements

                                Copyright © 1998-2013 Developer Express Inc.
                                ALL RIGHTS RESERVED
                                All trademarks or registered trademarks
                                are property of their respective owners