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.

Preventing resizing of columns from within a covered range. (IgnoreHeaders doesn''t seem to work.)

Thread ID:

Created:

Updated:

Platform:

Replies:

55358 Jan 29,2007 08:02 AM Jan 29,2007 08:21 AM Windows Forms 1
loading
Tags: GridControl
Richard Deverson
Asked On January 29, 2007 08:02 AM

Hi,
I have a grid with a couple of Row Header rows.

I have merged (added covered ranges) some of the cells of the first Row Header row.

The problem is that the user can still resize the column widths by moving the mouse into the covered range of cells. I.e. the mouse cursor changes to the resize columns cursor, even though the column boundary is not visible within the covered range.

Is this the intended behaviour?

I have tried this:
gridControl1.ResizeColsBehavior = GridResizeCellsBehavior.ResizeSingle | GridResizeCellsBehavior.IgnoreHeaders | GridResizeCellsBehavior.InsideGrid;

IgnoreHeaders doesn't seem to have any effect, as far as I can see.
I hoped that by setting the IgnoreHeaders flag, I could prevent column resizing from within the headers, as a workaround.

By the way, I am using Syncfusion 3.3.0.0

Administrator [Syncfusion]
Replied On January 29, 2007 08:21 AM

You can avoid seeing this sizing cursor by handling the ResizingColumns event.

void gridControl1_ResizingColumns(object sender, GridResizingColumnsEventArgs e)
{
if (e.Reason == GridResizeCellsReason.HitTest)
{
GridRangeInfo range = this.gridControl1.CoveredRanges.FindRange(0, e.Columns.Left);
if (!range.IsEmpty && range.Right != e.Columns.Right)
{
e.Cancel = true;
}
}
}

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.

;