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.
Syncfusion Feedback

Column width for new columns

Thread ID:

Created:

Updated:

Platform:

Replies:

22462 Dec 14,2004 06:47 AM UTC Dec 15,2004 08:10 AM UTC Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 14, 2004 06:47 AM UTC

Hi, I am removing and inserting the columns.for the newly inserted columns ,width becomes very less. I am trying resizeToFit in the Model_QueryColWidthEvent but now helping. Which method should be used and where it should be called?

Administrator [Syncfusion]
Replied On December 14, 2004 08:22 AM UTC

After you insert your columns, try calling grid.Model.ResetVolatileData and then call resizetofit. If that does not work, after you insert your columns, try calling grid.Refresh and then resizetofit.

Administrator [Syncfusion]
Replied On December 15, 2004 12:19 AM UTC

I tried both the options it is not working. When i load the grid for the first time i called following.For the first time its working and same method i called after insert columns its not working. this.m_PretestListingGrid.Model.ColWidths.ResizeT oFit( GridRangeInfo.Row(0)); >After you insert your columns, try calling grid.Model.ResetVolatileData and then call resizetofit. > >If that does not work, after you insert your columns, try calling grid.Refresh and then resizetofit.

Administrator [Syncfusion]
Replied On December 15, 2004 08:10 AM UTC

If you are trying to resize headers (you listed row 0 in your call), then you need to make sure you use the IncludeHeaders resize option. Model.ColWidths.ResizeToFit(GridRangeInfo.Row(0), GridResizeToFitOptions.IncludeHeaders);

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.

Warning Icon 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.Close Icon

;