【发布时间】:2019-11-12 09:13:39
【问题描述】:
我想隐藏一个数据行而不在 c# 或 vb.net 中删除它。请帮我解决一下这个。 我想隐藏数据行而不在 c# 或 vb.net 中删除它。
ResultSelection.Checked = False ' Checkbox
Dim Dt As DataTable
Dim dr as datarow
Private SBind As BindingSource = New BindingSource()
With Dt
.Columns.Add(" Name", GetType(String))
.Columns.Add("Age" , GetType(integer))
.Columns.Add("Marks" , GetType(integer))
dr(0) = ( "Mark",19,99)
dr(1) = ( "Rahul",20,35)
dr(2) = ( "Steve",19,50)
SBind.DataSource = Dt
DatargridView.DataSource = SBind
if ResultSelection.Checked = False then
"entire row dr(2) should not be visible
else
"entire data table should be visible along with dr(2)
end if
【问题讨论】:
-
我们需要更多解释和一些代码。
-
DataTable 只是一种以逻辑方式存储数据的方式,而不是视觉方式
-
想想@Jules 说的,你说的是DataGridView 而不是DataTable。还是您使用 DataTable 作为 DataGridView 的源?
标签: c# vb.net datatable windows-forms-designer c#-to-vb.net