Hi Experts
My problem is how to search any text in data grid view ?
please help me soooon........

Why not try using linq to query the dataset or the list then bing it to your GridView for example.

Dim query= From q In MyDataSet _
                    Where q.Equals(MySearchTextBox.Text) _
                    Select New With { _
                   .Column1Name= p.Column1.Value, _
                   .Column2Name= p.Column2.Value, _
                   .Column2Name= p.Column2.Value}
GridView1.DataSource = query 'might need to use query.ToList
GridView1.DataBind()

>My problem is how to search any text in data grid view ?

Use Filter property of DefaultView (DataView) of datasource (DataTabe).

It is important to note that a datagridview is only a means of displaying an underlying datasource. When working to manipulate that data you should work directly with that underlying source.

Unless the column you are searching happens to be the table primary key, using a dataview as Adapost suggests is probably the most efficient way of filtering a DataTable.

Be a part of the DaniWeb community

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