I want to bind below datatable into a radmenu control with sub node.Please help me with some sample code.
Menu should be generate like below.
Campaigns & Program-> Advertising->Bundel, Business Class, Etc
Tactics & Branded Example -> Adverting And Design->Bill Insert, Billboard, etc
My datatable contain following data-
ID Title Parent Level sno Root URL
----------- -------------------------------------------------- ----------- ----------- ----------- ----------- --------------------
1 Campaigns and Programs 0 1 1 1 CampaignHeader.aspx
5 Tactics and Branded Ex 0 1 1 2 TacticHeader.aspx
6 Advertising and Design 5 2 1 2 home_page.aspx
6 Advertising and Desi 5 2 1 2 home_page.aspx
7 Bill Insert 6 3 2 2 NULL
7 Bill Insert 6 3 2 2 NULL
8 Brand Standards 0 1 1 3 BrandStandardsHome.aspx
11 Call Tracker 1 2 3 1 NULL
11 Call Tracker 1 2 3 1 NULL
16 Research 0 1 1 4 ResearchHome.aspx
17 Resources 0 1 1 5 ResourcesHome.aspx
18 Collateral and Office 5 2 3 2 home_page.aspx
18 Collateral and Office 5 2 3 2 home_page.aspx
25 Billboard 6 3 3 2 NULL
25 Billboard 6 3 3 2 NULL
26 Buck Slips 6 3 25 2 NULL
30 Door Hanger 6 3 25 2 NULL
30 Door Hanger 6 3 25 2 NULL
31 eMarketing 6 3 25 2 NULL
32 Core Brand Elements 8 2 1 3 home_page.aspx
32 Core Brand Elements 8 2 1 3 home_page.aspx
33 Communication Materials 8 2 2 3 home_page.aspx
33 Communication Materials 8 2 2 3 home_page.aspx
36 Brand Awareness & Image 16 2 1 4 #
36 Brand Awareness & Image 16 2 1 4 #
37 Affiliates 17 2 1 5 home_page.aspx
37 Affiliates 17 2 1 5 home_page.aspx
38 Logo Usage 32 3 1 3
I have tried with below code but it is not working.
RadMenu2.DataSource = dt
RadMenu2.DataFieldParentID = "Parent"
''Set Text, Value, and NavigateUrl:
RadMenu2.DataTextField = "Title"
RadMenu2.DataValueField = "ID"
RadMenu2.DataNavigateUrlField = "URL"
RadMenu2.DataBind()
Thanks