76 805
Assignments Done
Successfully Done
In June 2019

Answer to Question #21465 in C# for Tabish

Question #21465
I made a program in C#, I am retrieving data from a text file in datagridview.
I made a textbox, i want to do whenever user types into a textbox, the datagridview filter and shortlist the matching data automatically.how can i do that? I am new to c#, Please send me the code.
thanks in advance.
Expert's answer

//This is example of code filtered by column "Name"
private void buttonFilterClick(sender object, EventArgs e)
DataSet ds = new DataSet();
DataView dv = new DataView (ds.Tables[0]); //ds.Tables["name"]
grid.DataSource = dv;
dv.RowFilter = string.Format(" Name& like '{0}' ", textBox1.Text);

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions