Hi All
Can someone tell the syntax for "AutoSizeRowMode" pls?
What i typed were this
The error return is
"Constant cannot be the target of an assigments (BC30074)"
Can someone tell the syntax for "AutoSizeRowMode" pls?
What i typed were this
VB.NET:
dgv1.AutoSizeRowMode.AllCells = true
The error return is
"Constant cannot be the target of an assigments (BC30074)"
VB.NET:
Private Sub SetupGrid()
' For the second grid, columns are generated manually
dgv1 = New DataGridView()
dgv1.Name = "dgv1"
dgv1.AllowUserToOrderColumns = True
dgv1.AllowUserToDeleteRows = False
dgv1.AllowUserToAddRows = False
' Render alternating rows with a different background color
dgv1.AlternatingRowsDefaultCellStyle.BackColor = SystemColors.InactiveCaptionText
dgv1.AutoGenerateColumns = False
dgv1.DataSource = bsUser
' Only one selection is supported at a time
dgv1.MultiSelect = False
' Configure the grid to use cell selection
dgv1.SelectionMode = DataGridViewSelectionMode.CellSelect
' Because this grid will contain unbound columns
' VirtualMode must be On.
dgv1.VirtualMode = True