Tutorial Vb.Net : Fungsi Search / Cari Data di DataGridView

Tutorial Vb.Net : Cara membuat Fungsi Search atau Fungsi Cari Data di DataGridView untuk mencari data di seluruh rows datagridview vb net 2010 terbaru !

Bagaimana cara mencari data pada seluruh baris DataGridview ?

Tutorial sebelumnya di Sector Code : Cara Menampilkan Data dari Datagridview ke TextBoxCara Menampilkan data dari Database MySql ke DataGridView, dan untuk mencari seluruh isi row pada datagridview silahkan tambahkan Function Search berikut ke Form anda,
    Private Function carinama(ByVal namasiswa As String) As Integer
        Try
            Dim foundrow As DataGridViewRow = (
            From row As DataGridViewRow In DataGridView1.Rows
             Where row.Cells(1).Value = namasiswa
            Select row
            ).First
            If foundrow IsNot Nothing Then
                Return (foundrow.Index)
            Else
                Return -1
            End If
        Catch ex As Exception
            Return -1
        End Try
    End Function
Code diatas adalah code function untuk mencari seluruh data yang ada pada datagridview1 dan pada cell 1, yaitu kebetulan dalam percobaan penulis, field nama ada di cell 1, anda bisa menyesuaikannya sendiri, selanjutnya buatlah sebuah textbox untuk tempat mencari / menuliskan nama yang anda cari, klik 2 kali textbox tersebut dan masukkan code berikut :
    Private Sub TextBox19_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox19.TextChanged
        carinama(TextBox19.Text)
        Dim xloop1 As Integer
        Dim spola As String
        Dim sbuka As String
        Dim sbetul As Boolean
        spola = TextBox19.Text + "*"
        DATABARU = False
        Me.Cursor = Cursors.WaitCursor
        Button2.Enabled = True
        Button3.Enabled = True
        For xloop1 = 1 To DataGridView1.RowCount - 1
            sbuka = DataGridView1.Rows(xloop1 - 1).Cells(1).Value
            sbetul = UCase(sbuka) Like UCase(spola)
            If sbetul = True Then
                DataGridView1.CurrentCell = DataGridView1.Item(1, xloop1 - 1)
                isiTextBox(xloop1 - 1)
            End If
        Next
        Me.Cursor = Cursors.Default
    End Sub
tekan f5 untuk mencoba alikasi search data anda, dan lihat hasilnya,

Tutorial Vb.Net : Fungsi Search / Cari Data di DataGridView

Jika masih bingung dengan tutorial diatas, silahkan lihat video tutorial berikut

Video Tutotorial How to Filter Data In DataGridView?


Video Tutorial How to Search Functions In GridView V1


jangan sungkan - sungkan untuk berkomentar, terima kasih ;)

Feel free to code it up and send us a pull request.

Hi everyone, let's me know how much this lesson can help your work. Please Subscribe and Follow Our Social Media 'kodeajaib[dot]com' to get Latest tutorials and will be send to your email everyday for free!, Just hit a comment if you have confused. Nice to meet you and Happy coding :) all ^^



Follow by E-Mail


Name

ADO.NET,3,Ajax,6,Android,9,AngularJS,4,ASP.NET,4,Blogger Tutorials,7,Bootstrap,7,C++,1,Codeigniter,2,Cplusplus,6,Crystal Report,6,CSharp,25,Ebook Java,2,FlyExam,1,FSharp,3,Game Development,2,Java,35,JDBC,2,Laravel,89,Lumen,2,MariaDB,2,Ms Access,3,MySQL,31,ODBC,6,OleDB,1,PHP,14,PHP Framework,6,PHP MYSQLI,9,PHP OOP,5,Python,8,Python 3,4,SQL Server,4,SQLite,4,Uncategorized,5,Vb 6,2,Vb.Net,89,Video,48,Vue Js,4,WPF,2,Yii,3,
ltr
item
KODE AJAIB: Tutorial Vb.Net : Fungsi Search / Cari Data di DataGridView
Tutorial Vb.Net : Fungsi Search / Cari Data di DataGridView
Tutorial Vb.Net : Cara membuat Fungsi Search atau Fungsi Cari Data di DataGridView untuk mencari data di seluruh rows datagridview vb net 2010 terbaru !
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRPLvihI3ZI-_SYNGAjG5zesl_do_r6HiuBLR4m2zFO_a29b0WVeVjgJ1xID1OxNsNxrGegz5c2OwpzcmNJWrFU8Ei-xovVbeiuSTAmAKqA4sQF_Os_IboaZodJ5IyPp1G_sGgFzjZogQ/s1600/membuat-fungtions-search-vbnet.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRPLvihI3ZI-_SYNGAjG5zesl_do_r6HiuBLR4m2zFO_a29b0WVeVjgJ1xID1OxNsNxrGegz5c2OwpzcmNJWrFU8Ei-xovVbeiuSTAmAKqA4sQF_Os_IboaZodJ5IyPp1G_sGgFzjZogQ/s72-c/membuat-fungtions-search-vbnet.png
KODE AJAIB
https://scqq.blogspot.com/2015/03/tutorial-vbnet-fungsi-search-cari-data.html
https://scqq.blogspot.com/
https://scqq.blogspot.com/
https://scqq.blogspot.com/2015/03/tutorial-vbnet-fungsi-search-cari-data.html
true
3214704946184383982
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy