Hi Team,
Am using a RadPanelbar as a Menu structure for my website. V 2013.2.717.40
This PanelBar is populated from a SQL Datasource and is placed in a Masterpage.
Now when I click on the item, It will go to the corresponding page. I want the Panelbar to be expanded and the selection on the selected page.
When I was using static Panelbar, it was working perfect.
Once I changed it to Databinding to SQL Datasource, the FindItemByText method is returning 'Nothing'
So I cant make the item expanded..
Here is my masterpage code.
Am using the Databound event also
And to make the Selection expanded in the other page, am using the code as below in page_load event
Can anyone help me to sort out this..
Thanks and Regards
Renju
Am using a RadPanelbar as a Menu structure for my website. V 2013.2.717.40
This PanelBar is populated from a SQL Datasource and is placed in a Masterpage.
Now when I click on the item, It will go to the corresponding page. I want the Panelbar to be expanded and the selection on the selected page.
When I was using static Panelbar, it was working perfect.
Once I changed it to Databinding to SQL Datasource, the FindItemByText method is returning 'Nothing'
So I cant make the item expanded..
Here is my masterpage code.
<
telerik:RadPanelBar
ID
=
"rdMenuBar"
Runat
=
"server"
Width
=
"200px"
ExpandMode
=
"FullExpandedItem"
DataFieldID
=
"Forms_PK_ID"
DataSourceID
=
"SqlDataSource1"
DataValueField
=
"Forms_PK_ID"
DataFieldParentID
=
"Forms_ParentID"
DataNavigateUrlField
=
"Forms_Url"
DataTextField
=
"Forms_Name"
OnItemDataBound
=
"rdMenuBar_ItemDataBound"
>
<
DataBindings
>
<
telerik:RadPanelItemBinding
Depth
=
"0"
ImageUrlField
=
"Forms_Icon"
TextField
=
"Forms_Name"
/>
<
telerik:RadPanelItemBinding
Depth
=
"1"
ImageUrlField
=
"Forms_Icon"
TextField
=
"Forms_Name"
/>
</
DataBindings
>
</
telerik:RadPanelBar
>
Am using the Databound event also
Protected
Sub
rdMenuBar_ItemDataBound(sender
As
Object
, e
As
Telerik.Web.UI.RadPanelBarEventArgs)
Handles
rdMenuBar.ItemDataBound
Dim
dataRow
As
DataRowView =
DirectCast
(e.Item.DataItem, DataRowView)
e.Item.Attributes(
"Text"
) = dataRow(
"Forms_Name"
).ToString()
e.Item.Text = e.Item.Attributes(
"Text"
)
End
Sub
And to make the Selection expanded in the other page, am using the code as below in page_load event
Dim
rdMenuBar
As
RadPanelBar = Master.FindControl(
"rdMenuBar"
)
Dim
ExpandedItem
As
RadPanelItem = rdMenuBar.FindItemByText(
"Configurations"
)
Dim
SelectedItem
As
RadPanelItem = rdMenuBar.FindItemByText(
"Service"
)
ExpandedItem.Expanded =
True
SelectedItem.Selected =
True
Can anyone help me to sort out this..
Thanks and Regards
Renju