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.
1
Expert's answer
2013-01-29T07:51:58-0500
//This is example of code filtered by column "Name" private void buttonFilterClick(sender object, EventArgs e) { DataSet ds = new DataSet(); ds.ReadXML(fileName); DataView dv = new DataView (ds.Tables[0]); //ds.Tables["name"] grid.DataSource = dv; dv.RowFilter = string.Format(" Name& like '{0}' ", textBox1.Text); }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment