I am using RadPanelbar as menu item in my app. The PanelBar is getting created dynamically from the database. I would like to differentiate parent and child menu items. The following is what I would like to do. Please let me how I can get this functionality.
1) User should not be able to click on the Parent item.
2) Add 2 different icons to Parent and Child menu items.
The following is my code.
Public Sub BindPanelBar(ByVal ds As DataSet)
RadPanelBar1.DataTextField = "description"
RadPanelBar1.DataNavigateUrlField = ""
RadPanelBar1.DataFieldID = "id"
RadPanelBar1.DataFieldParentID = "PARENT_ID"
RadPanelBar1.DataValueField = "Code"
RadPanelBar1.DataSource = ds
RadPanelBar1.DataBind()
End Sub
Protected Sub RadPanelBar1_ItemDataBound(ByVal sender As Object, ByVal e As RadPanelBarEventArgs) Handles RadPanelBar1.ItemDataBound
Dim row As DataRowView = DirectCast(e.Item.DataItem, DataRowView)
e.Item.Enabled = [Boolean].Parse(row("enable_status").ToString())
e.Item.Expanded = True
e.Item.ToolTip = e.Item.Text
End Sub
Thank you,