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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Handling the double click on header borders

Thread ID:





68269 Sep 14,2007 03:46 AM UTC Sep 17,2007 11:38 AM UTC WinForms 1
Tags: GridControl
Ben Fraser
Asked On September 14, 2007 03:46 AM UTC


When the user double clicks on the header border the size of the column is reset to the default width by default.

I'd like to resize the column to be just large enough to fit the contents of all the cells in.

Is there an event I can add a handler to to do this?


Golda Rebecal [Syncfusion]
Replied On September 17, 2007 11:38 AM UTC

Hi Ben,

Sorry for the delay in responding.

You can make the column fit to text on resize double click by using the ResizeToFit method in the ResizingColumns event.

void gridControl1_ResizingColumns(object sender, Syncfusion.Windows.Forms.Grid.GridResizingColumnsEventArgs e)
if (e.Reason.Equals(GridResizeCellsReason.DoubleClick))
e.Cancel = true;


Please try this and let me know if this helps you.

We appreciate your interest in Syncfusion products.

Best regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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