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

                                You must  log in  or  register  to leave comments

                                1 Solution

                                0

                                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#]
                                [C#] (MyGridControl. KeyboardFocusView as DevExpress.XtraGrid.Views.Grid.GridView).BestFitColumns();
                                [VB.NET]
                                [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.

                                You must  log in  or  register  to leave comments

                                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