4
Contributors
3
Replies
6
Views
7 Years
Discussion Span
Last Post by TomW
0

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()
0

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

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

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.