Ticket Q139901
Visible to All Users

Apply Best Fit for all columns

created 16 years ago

I would like to apply programmatically best fit for all columns of my gridview, and I haven't find whether it was possible in C#.
I've seen it was possible in VB through the ApplyBestFit() method, so I expect there is an equivalent method for C# (?).
Thank you in advance for your response.

Answers

created 16 years ago

Hi Celine,
You can use the GridView.BestFitColumns() method to accomplish this task.
Please review the following article in help : XtraGrid GridView.BestFitColumns Method.
Thanks,
Andrew

    Comments (2)

      Where should I put the BestFit method?

      DevExpress Support Team 8 years ago

        Hello Greyce,
        To avoid any misunderstanding, I've created a separate**GridView - Where in code the BestFitColumns method can be invoked**ticket on your behalf. Please refer to it for further discussion.

        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.