menuitem1.Text = "Master"
menuitem2.Text = "Sub Master"
While reader.Read
menuitem(j) = New MenuItem
menuitem(j).Text = reader("vcMenuName")
menuitem(j).MenuItems.Add(reader("vcMenuName"))
j = j + 1
End While
Dim k As Integer
mainmenu1.MenuItems.Add(menuitem1)
Me.Menu = mainmenu1
End Sub

This was my code my code is running but iam using single query to get the menu dynamically , Here is my problem starts

the menu come straight Ex(Ajeeth,Anand,Charkes,muthu,hari)
here i need anand as sub menu under anand, i needed charkes,muthu, hari
so this is result i need

Thanks in advance