我想一次使用两列在 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)
关于Vb.net 2010,如何同时使用两个过滤器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28104889/