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

Set minimum range to column with of a grid

Thread ID:





80213 Mar 20,2009 11:36 AM UTC Mar 23,2009 04:43 AM UTC WinForms 1
Tags: GridControl
Asked On March 20, 2009 11:36 AM UTC


when i resizing the column of a grid by click and drag the column header , its disappearing when the size reaching zero. and it is not possible to get the clolumn back.
So how can I set a minimum and maximum width range to grid column.?
All helps are appreciable.

Ali PP

Jisha Joy [Syncfusion]
Replied On March 23, 2009 04:43 AM UTC

Hi Alipalengara,

Actually when you resize the column using mouse and make it hidden, you can bring back that column just by double clicking on the column seperator as the resize indicator appears.

If you want to avoid column being hidden as you resize, then you can hook to the TableControlResizingColumns event of the GridGroupingControl that gets triggered when columns in grid are resized. In the event handler code, check for the width of the column that is resized and cancel the event if its hidden(width=0).

void gridGroupingControl1_TableControlResizingColumns(object sender, GridTableControlResizingColumnsEventArgs e)
if ((e.Inner.Reason == GridResizeCellsReason.MouseMove || e.Inner.Reason == GridResizeCellsReason.MouseUp)
&& e.Inner.Width == 0)
// set e.Inner.Cancel to true to avoid column being hidden
//e.Inner.Cancel = true;
Console.WriteLine("Column Hidden");

Let me know if you have any other questions.



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