I got this code which works fine:
DataView dv = new DataView(bazaDataSet.tbl_baza);
if (listBox1.SelectedIndex == 0)
{
dv.RowFilter = string.Format("Name LIKE '%{0}%'", txtSearchData.Text);
dataGridView1.DataSource = dv;
}
but I'm trying to search more than one column, and I can't get it to work for me. At the end I want user to be allowed to choose more then one item from listBox and search database regarding that choice.
Aucun commentaire:
Enregistrer un commentaire