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. Image for the cookie policy date
close icon

Column disappear when we resize the column to ''zero'' width in GridGroupingControl

Hi,

When we resize any column in the GridGroupingControl to 'zero' size, the respective column is getting disappear and when we double click at the same location where we lost the column it reappears.

I dont want to double click on the column headers where I lost the column, and want to avoid hiding the column in this situation.

Please let me know how we can achieve this.

Regards
Vijay

1 Reply

AD Administrator Syncfusion Team October 23, 2006 08:01 PM UTC

Hi Vijay,

The default behavior is to reshow the hidden columns when you double-click the column border when you see the resizing indicator.
If you dont want to doubleclick on the column headers to reshow the zero-sized column and want to avoid hiding columns in this fashion, then you can cancel this operation in the TableControlResizingColumns event handler. Kindly try the code below

private void gridGroupingControl1_TableControlResizingColumns(object sender, GridTableControlResizingColumnsEventArgs e)
{
// to avoid showing the hidden columns on doubleclicking over the borders
if(e.Inner.Reason == GridResizeCellsReason.DoubleClick || e.Inner.Reason == GridResizeCellsReason.ResetHide)
e.Inner.Cancel = true;
// to avoid hiding columns using the resizing indicator
if(e.Inner.Reason == GridResizeCellsReason.MouseUp && e.Inner.Width == 0)
e.Inner.Cancel = true;
}

Let me know if you have any other questions.
Regards,
Rajagopal


Loader.
Live Chat Icon For mobile
Up arrow icon