【发布时间】:2013-03-28 14:29:36
【问题描述】:
问题是我需要隐藏 DataGrid 的某些行,具体取决于它们显示的监视器。
这是我的代码:
For Each row As DataRowView In DataGrid1.Items
cellValue = row.Item("Monitor")
If cellValue.StartsWith("B") Then
//the code i need
End If
Next
DataGrid1.Items.Remove() 或 DataGrid1.Items.RemoveAt() 无法使用,因为调用它们时我的 ItemSource 正在使用中。
我更喜欢将其可见性更改为隐藏或高度为 0。
对不起,如果这个问题的格式不正确或看起来很糟糕,这是我的第一个问题:P(欢迎任何提示)
提前致谢
【问题讨论】: