本文介绍了订购Datagrid列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将复选框移动到第1列
How do i move the check box to column 1
DataGridView1.ColumnCount = 15
DataGridView1.Columns(0).Name = "Name"
Me.DataGridView1.Columns(0).DefaultCellStyle _
.Alignment = DataGridViewContentAlignment.MiddleLeft
DataGridView1.Columns(1).Name = "Att. (Y/N)"
DataGridView1.Columns(1).Width = 40
Me.DataGridView1.Columns(1).DefaultCellStyle _
.Alignment = DataGridViewContentAlignment.MiddleCenter
Dim checkCol As DataGridViewCheckBoxColumn = New DataGridViewCheckBoxColumn(1)
checkCol.HeaderText = "No Records"
DataGridView1.Columns.Add(checkCol)
DataGridView1.Columns(2).Name = "Mid. Wk. Call (Y/N)"
DataGridView1.Columns(2).Width = 40
Me.DataGridView1.Columns(2).DefaultCellStyle _
.Alignment = DataGridViewContentAlignment.MiddleCenter
推荐答案
这篇关于订购Datagrid列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!