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

HideCols - Hidden colums are unhidden when resizing.

I've got 4 colums. I'm hiding column 3. The user resize column 2 by double clicking on the right hand border of it (see HideCols.jpg). Column 3 is unhidden (see UnHiddenCols.jpg).

The hidden column is also active when copying three columns from Excel and pasting it into the table.

2 Replies

MB Meintjes Bekker May 2, 2007 09:17 AM UTC

I'm attaching the pictures for the earlier message.

HideCols.zip


HA haneefm Syncfusion Team May 2, 2007 02:57 PM UTC

Hi Meintjes,

The default behavior is to double click the column border to reset a hidden column. If you do not want this behavior, you can handle the ColsHiding event, and if a column is being shown, then cancel it. Below is a little snippet.

this.gridControl1.ColsHiding +=new Syncfusion.Windows.Forms.Grid.GridRowColHidingEventHandler(gridControl1_ColsHiding);
private void gridControl1_ColsHiding(object sender, GridRowColHidingEventArgs e)
{
if(e.Values[0] == false) //trying to show column
e.Cancel = true;
}

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon