We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

What event should I handle to autosize virtual grid?

Thread ID:

Created:

Updated:

Platform:

Replies:

36739 Nov 9,2005 05:37 AM Nov 9,2005 06:42 AM Windows Forms 1
loading
Tags: GridControl
Andrew
Asked On November 9, 2005 05:37 AM

Hi. What event should I handle to autosize virtual grid? Somthing like "AfterGridDraw". When I try to this.gridControl1.Model.ColWidths.ResizeToFit(GridRangeInfo.Col(e.ColIndex),GridResizeToFitOptions.IncludeHeaders); in QueryCellInfo handler I have an exception (about recursive calling of QueryCellInfo). How can I resize colWidths by width of word in header? Thanks

stanleyj [Syncfusion]
Replied On November 9, 2005 06:42 AM

Hi Andrew, You can make use of ResizeToFit in the Form_Load or in the constructor after the initial call and run of the ResetVolatileData function. To resize the columns only by the width of the word in the header, try this code given below. this.gridControl1.Model.ColWidths.ResizeToFit(GridRangeInfo.Row(0)); Trying to use such code in the QueryCellInfo handler will result in a recursive call. Best regards, Stanley

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;