我想一次使用两列在 Visual Basic 中过滤 datagridview。例如:我想过滤主题列和姓氏列,
我目前使用此代码:
me.studentbindingsource.filter = "Subject_code like '%" & ComboBox1.Text & "%'"
但它一次只能过滤一个。
使用 String.Format,
me.studentbindingsource.filter = String.Format("Subject_code like '{0}**' and Last_name like '{1}*'",Combobox1.text,strLastname)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)