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. (Last updated on: November 16, 2018).
Close Icon
Unfortunately, activation email could not send to your email. Please try again.
Close Icon
close icon
Vote for your favorite ebook
Succinctly Readers Awards 2020
Syncfusion Feedback

Sizing for multiheader rows

Thread ID:





41002 Feb 20,2006 09:54 AM UTC Feb 20,2006 11:36 AM UTC WinForms 1
Tags: GridControl
Asked On February 20, 2006 09:54 AM UTC

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 11:36 AM UTC

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.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon