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. Image for the cookie policy date
close icon

Sizing for multiheader rows

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

1 Reply

AD Administrator Syncfusion Team 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.

Loader.
Live Chat Icon For mobile
Up arrow icon