BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
grid.ColWidths.ResizeToFit(GridRangeInfo.Table(), GridResizeToFitOptions.None);
at some point after you have subscribed to your virtual grid event handlers. Now, if your table is large, this may take some time as it visits each cell dynamically computing the size required using Graphics.MeasureString. So, in that case, your solutiion might be better.
’ add the handler AddHandler Me.GridControl1.ResizingColumns, Addressof GridResizingColumns ..... Private Sub GridResizingCollumns(sender As Object, e As GridResizingColsEventArgs) If e.Reason = GridResizeCellsReason.DoubleClick Then Me.GridControl1.ColWidths.ResizeToFit( Me.GridControl1.ViewLayout.VisibleCellsRange.IntersectRange(e.Cols), False, True) e.Cancel = True End If End Sub ’GridResizingColumns