我现在设计了一个这么个录入窗口,窗口里加了一个Table(表)的控件,我有设计了一个查找栏,查找栏的代码如下,我想点击查找栏,Table(表)控件里的内容显示的是我查找栏里的内容,请问大神这段代码里还需要怎么修改。
Dim tbx As WinForm.TextBox = e.Form.Controls("czdwmc")
Dim chk As WinForm.CheckBox = e.Form.Controls("mhcz")
Dim str As String = tbx.Value
Dim dr As DataRow
If chk.Checked Then
dr = DataTables("冷轧日报").Find("熔次号 Like '%" & str & "%'","_identify desc") '模糊查找
Else
dr = DataTables("冷轧日报").Find("熔次号 = '" & str & "'","_identify desc") '精确查找
End If
If dr IsNot Nothing Then
Dim idx As Integer = Tables("冷轧日报").FindRow(dr)
If idx >= 0 Then
Tables("冷轧日报").Position = idx
End If
End If