Current filter:
                                You should refresh the page.
                                Support Center
                                  • How to Apply the Best Fit Feature to My Grid Columns

                                1 Solution

                                Creation Date Rating Importance Sort by

                                If you need to apply the Best Fit feature for the currently focused View (in case of using Master-Detail relationships, your grid can include several views), you should use the KeyboardFocusView property of your GridControl, typecast it to the GridView object and call its BestFitColumns method (this method is part of
                                GridView only (and derived views of course)).

                                [C#] (MyGridControl. KeyboardFocusView as DevExpress.XtraGrid.Views.Grid.GridView).BestFitColumns();
                                [Visual Basic] CType((MyGridControl. KeyboardFocusView, DevExpress.XtraGrid.Views.Grid.GridView).BestFitColumns

                                To adjust the width of a single grid column, use the GridColumn.BestFit method. You can access an individual column via the Columns array property of your grid view.

                                If you need additional product information, write to us at 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, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

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