S
H
A
R
E

Friday, July 15, 2011

Auto Sort in DataGridView From DataSet (Sorting, Selecting, Finding)

Auto Sort in DataGridView From DataSet 1
Find Row Match Like with TextBox


Auto Sort in DataGridView From DataSet 2

Call thi sub when TextBox1 Changed:

Sub DGVFind(ByVal key As String)
  Dim rc() As DataRow = DataSet1.Tables(0).Select("name like '" & key & "*'")
  DataGridView1.Rows.Clear()
  For Each r As DataRow In rc
    DataGridView1.Rows.Add(r.ItemArray)
  Next
End Sub

2 comments:

College Essays said...

Wow!!!! There are some pretty exciting presentations in this list..Your post reflects extensive research..

Klampok Child said...

Hey. thanks :-)

Post a Comment