Sabtu, 05 Desember 2015

Mengambil Data Tabel dan Menjadi Tabel Tabulasi VB.NET

Buat form seperti berikut :



dan ini coding untuk membuat tabel tabulanya :

Private Sub BPROSES_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BPROSES.Click
        Dim t As Integer
        For t = 0 To DataGridView1.Rows.Count - 2
            DataGridView2.Columns.Add(DataGridView1.Rows(t).Cells(1).Value, DataGridView1.Rows(t).Cells(1).Value)
        Next
    End Sub

Jika dirunning akan seperti ini hasilnnya






 

0 komentar:

Posting Komentar