Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
6677 | Aug 22,2003 05:26 AM UTC | Aug 25,2003 09:50 PM UTC | WinForms | 5 |
![]() |
Tags: GridControl |
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
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.
This page will automatically be redirected to the sign-in page in 10 seconds.