Hidden columns shown on columnheader-divider doubleclick

Hi there,

I'm using Syncfusion 4.302.0.30 and a gridcontrol.

I'm hiding columns with the following statement (after the grid is initialized):

this.gridControl1.Cols.Hidden [ 2 ] = true; // hide column 2

This works fine.
However, if I doubleclick the columnheaderdivider at column index 1 (right side) the hidden column appears again?

This is bad. What am I doing wrong?
A hidden column should be ALWAYS hidden, whatever the user triggrs via the UI.

I attached a sample which illustrates the issue.

Yours

Christian Teufel


GridResize.zip

3 Replies

AD Administrator Syncfusion Team December 9, 2006 12:21 AM UTC

This behavior is by design. If you want to disable it, you can handle the ResizingColumns event and cancel the DoubleClick.


private void gridControl1_ResizingColumns(object sender, GridResizingColumnsEventArgs e)
{
if(e.Reason == GridResizeCellsReason.DoubleClick)
e.Cancel = true;
}


DW dwedewdew December 11, 2006 09:14 AM UTC



>This behavior is by design. If you want to disable it, you can handle the ResizingColumns event and cancel the DoubleClick.


private void gridControl1_ResizingColumns(object sender, GridResizingColumnsEventArgs e)
{
if(e.Reason == GridResizeCellsReason.DoubleClick)
e.Cancel = true;
}



Thanks.

Is it possible to autosize the corresponding column to fit the cell text length on divider doubleclick?

Yours

Christian.


AD Administrator Syncfusion Team December 11, 2006 09:22 AM UTC

Hi Christian,

Please refer to the below forum thread for more details.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=38063

Best Regards,
Haneef

Loader.
Up arrow icon