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

Grid resizing issue

Thread ID:





60588 May 8,2007 03:40 PM UTC May 10,2007 08:02 AM UTC WinForms 2
Tags: GridControl
Kiran Reddy
Asked On May 8, 2007 03:40 PM UTC


PFA FFGrid derived from GridControl. I have two issues in the implementation of FFGrid:

1. I have an option of proportionate reisze of columns based on grid contents or custom resize where in user resizes the columns using mouse.

Steps to repro:
- Start the application.
- Right click on the header. Choose Resize Options -> Custom form the context menu.
- Now try to resize the columns using mouse, it is not possible. Columns should be resized by the user when Custom option is choosen.

2. TableStyle.Trimming is set to StringTrimming.EllipsisCharacter. But this setting has no effect on the grid. If I set this in QueryCellInfo then this is working fine. Why the TableStyle setting didn't have any effect?

Kindly let me how to resolve the issue. Thanks.



haneefm [Syncfusion]
Replied On May 9, 2007 05:54 PM UTC

Hi Kiran,

Issue 1: Resizing the columns in a grid.

You need to set the width of the columns in the OnResizeColumns override method. Below is a code snippet.

protected override void OnResizingColumns(GridResizingColumnsEventArgs e)
//Double Click actually shows the hidden cloumns. So cancel it.
if (e.Reason == GridResizeCellsReason.DoubleClick && !this.UseProportionateColResizing)
if (this.ViewLayout.VisibleCellsRange.IsEmpty)
this.ColWidths.ResizeToFit(GridRangeInfo.Cols(1, this.ColCount), GridResizeToFitOptions.IncludeHeaders);
this.ColWidths.ResizeToFit(this.ViewLayout.VisibleCellsRange, GridResizeToFitOptions.IncludeHeaders);
e.Cancel = true;
else if (this.UseProportionateColResizing && e.Reason == GridResizeCellsReason.HitTest)
e.Cancel = true;
else if (!this.UseProportionateColResizing && e.Reason == GridResizeCellsReason.MouseUp)
this.ColWidths[e.Columns.Left] = e.Width;

Issue 1: Setting the Trimming property.

You can try setting this property in a OnQueryCellInfo method and let me know if this helps.

Please refer to the attached sample for implementation.

Best regards,

Kiran Reddy
Replied On May 10, 2007 08:02 AM UTC

1. Grid resize worked.
2. I already specified it worked if I set Trimming in QueryCellInfo. I want to know why it didn't when I set it in TableStyle.




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

or the page will be automatically redirected to 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