怎么样设置DataGrid的某些列为看不见??
例如设置一个checkbox开关,来控制datagrid的某列的可视性!
With table.Columns
.Add("摘要", GetType(System.String))
.Add("LastName", GetType(System.String))
.Add("项目明细", GetType(System.String))
End With
Dim row As DataRow
row = table.NewRow
row("摘要") = "5月报销"
row("项目明细") = "差旅费"
table.Rows.Add(row)
table.Columns("LastName").ColumnMapping = MappingType.Hidden
DataGrid1.DataSource = table