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

Auto Resizing Problem

Thread ID:





77950 Nov 21,2008 12:58 PM UTC Nov 24,2008 11:34 AM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On November 21, 2008 12:58 PM UTC

When I auto resize a column , I am getting extra space after the last column which is shown by a Cross and I do not want it. What can I do? SizetoFit method does not work in GridControl Class. Thank you.


Administrator [Syncfusion]
Replied On November 21, 2008 01:00 PM UTC

The Problem can be easily seen in the file attached in the above post Thank you.

Nisha Arockiya A [Syncfusion]
Replied On November 24, 2008 11:34 AM UTC

Hi Vighnesh,

Thanks for your interest in Syncfusion Products.

Yan can resize grid columns inorder to fill the entire Grid using the following code snippet.Please refer to it.

this.gridControl1.QueryColWidth += new Syncfusion.Windows.Forms.Grid.GridRowColSizeEventHandler(this.gridControl1_QueryColWidth);

private void gridControl1_QueryColWidth(object sender, GridRowColSizeEventArgs e)
if (e.Index == this.gridControl1.Model.ColCount)
e.Size = this.gridControl1.ClientSize.Width - this.gridControl1.Model.ColWidths.GetTotal(0, this.gridControl1.Model.ColCount - 1);
e.Handled = true;

Please let me know if this helps.



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