Sub TabelGroup()
With Me.ListView1
.FullRowSelect = True
.GridLines = True
.AllowColumnReorder = True
.CheckBoxes = True
.HoverSelection = True
.View = Windows.Forms.View.Details
With .Columns
.Add("", 0)
.Add("Kode", 60, HorizontalAlignment.Center)
.Add("Nama Group", 200)
.Add("Tipe1", 0)
.Add("Tipe", 150)
.Add("Jumlah Menu", 100, HorizontalAlignment.Center)
.Add("Keterangan", 480)
End With
End With
End Sub
Sub DataGroup()
Me.Cursor = Cursors.WaitCursor
cSelect("SELECT group_kode, group_nama, group_akses, group_keterangan, " & _
"group_akses, GetGroupJenis(group_akses) as Tipe, " & _
"GetGroupJumlah(group_kode) as JumlahMenu " & _
"FROM data_pengguna_group")
Me.ListView1.Items.Clear()
If rdr.HasRows Then
Do While rdr.Read
Dim ls As New ListViewItem()
ls.SubItems.Add(rdr.Item("group_kode").ToString())
ls.SubItems.Add(rdr.Item("group_nama").ToString())
ls.SubItems.Add(rdr.Item("group_akses").ToString())
ls.SubItems.Add(rdr.Item("Tipe").ToString())
ls.SubItems.Add(rdr.Item("JumlahMenu").ToString())
ls.SubItems.Add(rdr.Item("group_keterangan").ToString())
ListView1.Items.Add(ls)
Loop
End If
rdr.Close()
Call lvWarna(Me.ListView1)
Me.Cursor = Cursors.Default
End Sub
Mengisi data di Listview VB.NET
Langganan:
Posting Komentar (Atom)
0 comments:
Posting Komentar