.:: Jasa Membuat Aplikasi Website,Desktop,Android Order Now..!! | | Order Now..!! Jasa Membuat Project Arduino,Robotic,Print 3D ::.

VB.NET - How To Delete DataGridView Row Checked Cell In VB NET

0 komentar


بِسْــــــــــــــــمِ اﷲِالرَّحْمَنِ اارَّحِيم
bismillaahirrahmaanirrahiim

السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
Assalamu'alaikum warahmatullahi wabarakatuh


vb delete datagridview row

VB.NET - How To Remove The Checked Row From Datagridview Using VB NET

                                                                                                                         

In This VB.NET Tutorial  We Will See How To Delete The DataGridView Row With  CheckBox ( Checked  Cell Is Checked ) In VBNET Programming Language.


Project Source Code:

Public Class VB_delete_datagridview_Row_checked_checkbox_cell

    Private Sub VB_delete_datagridview_Row_checked_checkbox_cell_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        'create a text columns
        Dim dgvcId As New DataGridViewTextBoxColumn()
        dgvcId.HeaderText = "Id"
        Dim dgvcFn As New DataGridViewTextBoxColumn()
        dgvcFn.HeaderText = "First Name"
        Dim dgvcLn As New DataGridViewTextBoxColumn()
        dgvcLn.HeaderText = "Last Name"

        'create checkbox column
        Dim dgvcCheckBox As New DataGridViewCheckBoxColumn()
        dgvcCheckBox.HeaderText = "Delete"

        'add columns to datagridview
        DataGridView1.Columns.Add(dgvcId)
        DataGridView1.Columns.Add(dgvcFn)
        DataGridView1.Columns.Add(dgvcLn)
        DataGridView1.Columns.Add(dgvcCheckBox)

        ' add some row to datagridview
        ' true the checkBox Is checked
        ' false the checkBox Is Not checked
        DataGridView1.Rows.Add("1", "DTYUI", "RTYUI", False)
        DataGridView1.Rows.Add("2", "KJHGF", "OIUY", False)
        DataGridView1.Rows.Add("3", "SDFGH", "LTDFGH", False)
        DataGridView1.Rows.Add("4", "ERJHGV", "CVHEYH", False)
        DataGridView1.Rows.Add("5", "AQSFGHKK", "TRDFHJH", False)
        DataGridView1.Rows.Add("6", "NQAAZTYI", "KITGHKG", False)
        DataGridView1.Rows.Add("7", "XBVSARY", "OTYHNC", False)
        DataGridView1.Rows.Add("8", "ACJKT", "PMLGESB", False)
        DataGridView1.Rows.Add("9", "FGHKL", "IUYTEYK", False)
        DataGridView1.Rows.Add("10", "WQAZR", "ERTYUVBD", False)
        DataGridView1.Rows.Add("11", "CKKTS", "EGCQA", False)

        DataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
        DataGridView1.AllowUserToAddRows = False

    End Sub

    ' button delete checked row
    Private Sub BtnDelete_Click(sender As Object, e As EventArgs) Handles BtnDelete.Click

        For i As Integer = DataGridView1.Rows.Count() - 1 To 0 Step -1
            Dim delete As Boolean
            delete = DataGridView1.Rows(i).Cells(3).Value

            ' if the checkbox cell is checked
            If delete = True Then
                Dim row As DataGridViewRow
                row = DataGridView1.Rows(i)
                DataGridView1.Rows.Remove(row)
            End If

        Next

    End Sub
End Class
      
///////////////OUTPUT:


vb remove datagridview checked row
VB.NET Remove DataGridView Checked Rows


Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
NB :: Bila Sobat tertarik Ingin membuat software, membeli software, membeli source code, membeli hardware elektronika untuk kepentingan Perusahaan maupun Tugas Akhir (TA/SKRIPSI), Insyaallah Saya siap membantu, untuk Respon Cepat dapat menghubungi kami, melalui :

No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com


atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :

ٱلْحَمْدُ لِلَّهِ رَبِّ ٱلْعَٰلَمِين
Alhamdulilah hirobil alamin

وَ السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
wassalamualaikum warahmatullahi wabarakatuh


Artikel VB.NET - How To Delete DataGridView Row Checked Cell In VB NET, Diterbitkan oleh scodeaplikasi pada Kamis, 31 Maret 2016. Semoga artikel ini dapat menambah wawasan Anda. Website ini dipost dari beberapa sumber, bisa cek disini sumber, Sobat diperbolehkan mengcopy paste / menyebar luaskan artikel ini, karena segala yang dipost di public adalah milik public. Bila Sobat tertarik Ingin membuat software, membeli software, membeli source code ,Dengan Cara menghubungi saya Ke Email: Fajarudinsidik@gmail.com, atau No Hp/WA : (fajar) : 085369237896, (puat) : 085267792168.

Tawk.to