16,717
社区成员
发帖
与我相关
我的任务
分享
'动态添加CheckBox列
Dim cel As New DataColumn("确认", System.Type.GetType("System.Boolean"))
dst.Tables(0).Columns.Add(cel)
cel.SetOrdinal(1)
datagridview.DataSource = Nothing
datagridview.DataSource = dst.Tables(0)
'判断是否选中
For i As Integer = 0 To datagridview.Rows.Count - 1
If datagridview.Rows(i).Cells(1).FormattedValue = True Then
'处理
End If
Next