Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 a DataGrid(不是 a DataGridView)中设置列的宽度?
DataGrid
DataGridView
我认为它是这样的:
dg.TableStyles(0).GridColumnStyles(0).Width = 120
Private Sub dgColumnWidths() 'Var = 0 对于第一列 Dim Var As Integer DataGrid1.Columns(Var).Width = 1000 End Sub