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.
Unfortunately, activation email could not send to your email. Please try again.

Hidden columns shown on columnheader-divider doubleclick

Thread ID:

Created:

Updated:

Platform:

Replies:

53149 Dec 8,2006 12:49 PM Dec 11,2006 04:22 AM Windows Forms 3
loading
Tags: GridControl
dwedewdew
Asked On December 8, 2006 12:49 PM

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

Administrator [Syncfusion]
Replied On December 8, 2006 07:21 PM

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;
}

dwedewdew
Replied On December 11, 2006 04:14 AM



>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.

Administrator [Syncfusion]
Replied On December 11, 2006 04:22 AM

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

CONFIRMATION

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.

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.

;