本文整理汇总了VB.NET中System.Windows.Forms.DataGridViewAutoSizeColumnsMode枚举的典型用法代码示例。如果您正苦于以下问题:VB.NET DataGridViewAutoSizeColumnsMode枚举的具体用法?VB.NET DataGridViewAutoSizeColumnsMode怎么用?VB.NET DataGridViewAutoSizeColumnsMode使用的例子?那么恭喜您, 这里精选的枚举代码示例或许可以为您提供帮助。
在下文中一共展示了DataGridViewAutoSizeColumnsMode枚举的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: GetData
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Me.Load
' Bind the DataGridView controls to the BindingSource
' components and load the data from the database.
masterDataGridView.DataSource = masterBindingSource
detailsDataGridView.DataSource = detailsBindingSource
GetData()
' Resize the master DataGridView columns to fit the newly loaded data.
masterDataGridView.AutoResizeColumns()
' Configure the details DataGridView so that its columns automatically
' adjust their widths when the data changes.
detailsDataGridView.AutoSizeColumnsMode = _
DataGridViewAutoSizeColumnsMode.AllCells
End Sub