Ticket T334097
Visible to All Users

XtraGrid - SizeToContent does not work

Answers approved by DevExpress Support

created 9 years ago (modified 9 years ago)

Hi Thomas,

I have discussed this issue with my colleagues from the WinForms team and confirm that XtraGrid does not support the size-to-content mode. It can be supported manually using the approach from the How to change the Grid's height according to the total height of its rows article (I see that you used the same approach in the CustomGridControl.UpdateGridSize method).
For this reason, I suggest you continue using this approach. I see that you faced issues with re-sizing controls located in docked panels when this approach is used. Please check our last comment How to size FloatPanel with XtraGrid located inside the WindowsFormsHost control, where we described a solution.

    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.