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.

Sizing for multiheader rows

Thread ID:

Created:

Updated:

Platform:

Replies:

41002 Feb 20,2006 04:54 AM Feb 20,2006 06:36 AM Windows Forms 1
loading
Tags: GridControl
Thierry
Asked On February 20, 2006 04:54 AM

Hello I am trying to use multiheader rows with GridControl. For that I froze the two first lines (with GridControl.Rows.SetFrozenCount) and "merged" the columns in the first line (by using GridControl.CoveredRanges). It works fine but I would like that the user resizes the columns on the second header row and not the first one. How can I do that? Thank you! Thierry

Administrator [Syncfusion]
Replied On February 20, 2006 06:36 AM

Hi Thierry, This can be acheived by setting the GridResizeCellsBehavior flags and by using the ResizingColumns event handler. Here is a code snippet. // In Form1_Load event this.gridControl1.ResizeColsBehavior = (((Syncfusion.Windows.Forms.Grid.GridResizeCellsBehavior.ResizeSingle | Syncfusion.Windows.Forms.Grid.GridResizeCellsBehavior.InsideGrid) | Syncfusion.Windows.Forms.Grid.GridResizeCellsBehavior.OutlineHeaders) | Syncfusion.Windows.Forms.Grid.GridResizeCellsBehavior.OutlineBounds); private void gridControl1_ResizingColumns(object sender, Syncfusion.Windows.Forms.Grid.GridResizingColumnsEventArgs e) { if (e.Reason == GridResizeCellsReason.HitTest) { GridRangeInfo range = gridControl1.PointToRangeInfo(e.Point); if (range.IsEmpty || range.Top != 1) e.Cancel = true; } } Here is a project sample, Let us know if you need further assistance, Regards, Madhan.

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.

;