Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I populate a hierarchial vb2005 menustrip from a database

Status
Not open for further replies.

wildsharkuk

Programmer
Mar 12, 2004
36
GB
hi,

I'm currently starting development on a database application, I wish to populate the menustrip of menuitems stored in a database. Each user who will log in will have different access rights to differnt menuitems eg user a will see:

[ul square]
[li]item A[/li]
[ul circle]
[li]item A1[/li]
[li]item A2[/li]
[li]item A3[/li]
[/ul]
[li]item B[/li]
[ul circle]
[li]item B1[/li]
[li]item B2[/li]
[/ul]
[li]item C[/li]
[ul circle]
[li]item C1[/li]
[li]item C2[/li]
[li]item C3[/li]
[li]item C4[/li]
[/ul]
[/ul]

and user b will see:

[ul square]
[li]item A[/li]
[ul circle]
[li]item A2[/li]
[li]item A3[/li]
[/ul]
[li]item B[/li]
[ul circle]
[li]item B1[/li]
[/ul]
[li]item C[/li]
[ul circle]
[li]item C3[/li]
[li]item C4[/li]
[/ul]
[/ul]

Also if i set rights for use to see menu item C4 then it will automatically cascade upwards to populate the parents and grantparents etc.

I will probably store the details as follows

MENU TABLE:
id, name, text, description, imagepath, function name

MENUPARENT TABLE:
MenuID, MenuParentID - Composite Key

USER TABLE:
id, name, password etc.

MENUUSER TABLE:
MenuID, UserID - Composite Key

Any help would be greatly appreciated

Many Thanks in advance

wildsharkuk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top