I have a panelbar with usercontrols loading in it. see code below,
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load | |||
RadPanelBar2.ExpandMode = PanelBarExpandMode.FullExpandedItem | |||
RadPanelBar2.DataFieldID = "" | |||
RadPanelBar2.DataFieldParentID = "ID1" | |||
RadPanelBar2.DataTextField = "Name" | |||
RadPanelBar2.DataValueField = "Text" | |||
RadPanelBar2.DataSource = MyDS | |||
RadPanelBar2.DataBind() | |||
If Not Page.IsPostBack Then | |||
RadPanelBar2.Items(0).Expanded = True RadPanelBar2.Items(0).Selected = True | |||
End If | |||
If Not RadPanelBar2.SelectedItem Is Nothing Then | |||
LoadUsercontrol(RadPanelBar2.SelectedItem.Text) | |||
End If | |||
End Sub | |||
Private Sub RadPanelBar2_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadPanelBarEventArgs) Handles RadPanelBar2.ItemDataBound Dim newPanelItem As New RadPanelItem e.Item.Items.Add(newPanelItem) End Sub | |||
Protected Sub LoadUsercontrol(ByVal selectedItem As String) | |||
Dim pItem As RadPanelItem = DirectCast(RadPanelBar2.FindItemByText(selectedItem), RadPanelItem) | |||
Dim smControl As SomeControl | |||
smControl = CType(LoadControl("MyControls/SomeControl.ascx"), SomeControl) | |||
smControl.MyID = pItem.Value | |||
pItem.Controls.Add(smControl) | |||
End Sub |
Problem: In the User control I have a hierarchy grid. The code above is inside content page. When I click rows (hierarchy) in the grid the panel item is expanding, but the radpanel is hiding in content page.
Even if I reduce the height to 400px no use.
How to fix this?