本文介绍了在数据表中查找和编辑行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有更好的方法?
Is there a better way of doing this?
For Each row In licenceTable.Rows
If row("DriveKey") = selectedKey Then
row("Location") = selectedLocal
End If
Next
推荐答案
licenceTable.DefaultView.RowFilter = "DriveKey = '" + selectedKey + "'"
For Each row In licenceTable.DefaultView
row("Location") = selectedLocal
Next
只需记住在引用
之前将RowFilter设置为空即可.再次使用默认视图.
Just remember to set the RowFilter to nothing before referencing the
default view again.
licenceTable.DefaultView.RowFilter = Nothing
这篇关于在数据表中查找和编辑行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!