我正在使用DataView和RowFilter,但我有这条消息错误:
“语法错误:'complet'运算符后缺少操作数。”
这是代码,那么什么不对?
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
DataView dv = new DataView(table);
if (comboBox2.SelectedItem.ToString()=="All")
{
dataGridView1.DataSource = table;
}
else
{
dv.RowFilter = string.Format("Nom complet LIKE '%{0}%'", comboBox2.SelectedItem.ToString());
dataGridView1.DataSource = dv;
}
}