Hi Mas Rokhmad My Friend, Pake Gini aja mas ro ....
Private Sub Form_Load()
Dim Node1 As Node
Dim rs As New ADODB.Recordset
Dim cn As New ADODB.Connection
Dim Pcode, Ccode As String
cn.ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;Persist Security
Info=" & _
"False;Data Source=" + App.Path + "\test.mdb"
cn.Open
Set rs = cn.Execute("SELECT Id,Pid,Name,Lvl FROM tb
order by Id,Lvl")
TreeView1.HideSelection = False
TreeView1.LabelEdit = tvwManual
TreeView1.LineStyle = tvwRootLines
Me.Icon = ImageList1.ListImages(11).Picture
Set Node1 = TreeView1.Nodes.Add(, , "R0", "Hirarki
Menu With Database", 5)
While Not rs.EOF
Pcode = "R" + CStr(rs(1))
Ccode = "R" + CStr(rs(0))
If rs(3) = 1 Then
TreeView1.Nodes.Add "R0", tvwChild, Ccode, rs(2), 3
Else
TreeView1.Nodes.Add Pcode, tvwChild, Ccode, rs(2), 2
End If
rs.MoveNext
Wend
Node1.Expanded = True
End Sub
Untuk moderator, saya attach contoh program dari skrip
diatas nih, dan juga minta ke moderator untuk contoh
menu hirarki ini di ditaruh di file millistnya
programmer-VB, buat sample rekan-rekan yang
membutuhkan juga nih, thank's
BST RGD,
Riyan Van Roy
email : [EMAIL PROTECTED]
--- Rokhmad Widhiawan <[EMAIL PROTECTED]> wrote:
> Pak Programmer-VB,
>
> Mohon bantuan,
> Adakah rekan yang punya contoh listing scriptnya
> treeview dengan
> menggunakan database seperti root-parent & child.
>
> Terimakasih
>
> Best regards,
> Rokhmad
> mailto:[EMAIL PROTECTED]
>
>
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/k7folB/TM
--------------------------------------------------------------------~->
Untuk keluar dari millis ini, kirim email kosong ke:
[EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Programmer-VB/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Hirarki Menu.rar
Description: 4061672476-Hirarki Menu.rar
