Hi again people,
i have a datagridview with "Persons" hosted in a xml file. When i click ShowData button i get the "Persons" in datagridview.

Also have a textbox control to filtering :

private void toolStripTextBox1_TextChanged(object sender, EventArgs e)
                //this code is used to search Name on the basis of TextBox1.text
                ((DataTable)dataGridView1.DataSource).DefaultView.RowFilter = string.Format("FullName like '%{0}%'", toolStripTextBox1.Text.Trim().Replace("'", "''"));
            catch (Exception)

but when i do a query, i enter a letter and nothing happens.

would like to know why, who can help me ?

When i waiting for a reply, i dont stop searching. And Then i get the problem solved.

Was to use a DataView in consultations and a DataTable in showdata button,
so i do this:

dataGridView1.DataSource = dv.ToTable();

the paramter "To.Table()";


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.