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

grid sizing

How can I size the grid control to be the size of the actual grid? (I''m trying to avoid gray space at the bottom and to the right) Thanks, Steve

2 Replies

Administrator March 16, 2005 12:46 AM UTC

You can try setting its ClientSize to be sum of the colwidths and the rowheights. Dim width As Integer = Me.gridControl1.Model.ColWidths.GetTotal(0, Me.gridControl1.ColCount) Dim height As Integer = Me.gridControl1.Model.RowHeights.GetTotal(0, Me.gridControl1.RowCount) Me.gridControl1.ClientSize = New Size(width, height)

Administrator March 16, 2005 12:46 AM UTC

You can try setting its ClientSize to be sum of the colwidths and the rowheights. Dim width As Integer = Me.gridControl1.Model.ColWidths.GetTotal(0, Me.gridControl1.ColCount) Dim height As Integer = Me.gridControl1.Model.RowHeights.GetTotal(0, Me.gridControl1.RowCount) Me.gridControl1.ClientSize = New Size(width, height)
Loader.
Live Chat Icon For mobile
Up arrow icon