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.