I have a RadPanelBar in an asp:Panel so that I can provide grouping functionality and GroupingText. Perhaps my choice of panelbar was inappropriate in this case, but the number of Level 0 items will almost certainly be larger than the space I've allocated to the panel, so a scroll is required. For example, I have about 100 categories of reports to choose from, and within each category there are anywhere from 1 to 20 report items.
I can restrict the size of the panelbar with CSS on the container panel, with overflow-x and -y set to auto. When data populates the panelbar, a scrollbar displays outside of the panel during control rendering, but it quickly disappears.
After selecting a Level 0 RadPanelItem (category), the list of Level 1 items displays, and then the panelbar scrollbar displays!
<asp:Panel ID="ReportsByCategoryPanel" GroupingText="Select a Category and Report" | |
runat="server" Style="z-index: 100; position: absolute; top: 5px; left: 2px;" | |
Width="473px" Height="400px" CssClass="GroupingPanel"> | |
<%--Sample data in panelbar is for designer, replaced at runtime--%> | |
<telerik:RadPanelBar ID="pbReportList" runat="server" BorderStyle="Inset" BorderWidth="2px" | |
Height="370px" Style="z-index: 105; position: relative; top: 2px; left: 2px;" | |
Width="420px" OnItemClick="pbReportList_ItemClick" AllowCollapseAllItems="True" | |
CollapseDelay="200" ExpandMode="FullExpandedItem" TabIndex="20"> | |
<Items> | |
<telerik:RadPanelItem runat="server" Text="Category 1"> | |
<Items> | |
<telerik:RadPanelItem runat="server" Text="Report C1R1"> | |
</telerik:RadPanelItem> | |
</Items> | |
</telerik:RadPanelItem> | |
<telerik:RadPanelItem runat="server" Text="Category 2"> | |
<Items> | |
<telerik:RadPanelItem runat="server" Text="Report C2R1"> | |
<Items> | |
<telerik:RadPanelItem runat="server" Text="Report C2R2"> | |
</telerik:RadPanelItem> | |
</Items> | |
</telerik:RadPanelItem> | |
</Items> | |
</telerik:RadPanelItem> | |
</Items> | |
</telerik:RadPanelBar> | |
</asp:Panel> |
The size of the content panel for the open category is much larger than the number of items. I might have 8 items but the default provides room for about 25 level 1 items before the next level 0 category displays. I set the ChildGroupHeight on level 0 category items to 100 but it doesn't seem to affect the size of the space allocated for groups of level 1 children. I am not using ItemTemplates.
Looking at the source via IE Developer Toolbar, I can see why the groups are mis-sized.
<ul class="rpRootGroup"> | |
<li class="rpItem rpFirst" _itemtypename="Telerik.Web.UI.RadPanelItem"> | |
<a class="rpLink rpExpandable rpFocused rpSelected rpExpanded" href="http://localhost:49573/MainContent01.aspx#"> | |
<span class="rpOut"><span class="rpText">Level 0 CategoryName</span> </span> | |
</a> | |
<div class="rpSlide" style="display: block; height: 912px" jquery1241584291328="4"> | |
<ul class="rpGroup rpLevel1 " style="display: block; width: 100%; height: 912px"> | |
<li class="rpItem rpFirst" _itemtypename="Telerik.Web.UI.RadPanelItem"> | |
<a class="rpLink " href="http://localhost:49573/MainContent01.aspx#"> | |
<span class="rpOut"><span class="rpText">First Level 1 Child Here...</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</li> | |
</ul> |
Look at the rpSlide height in line 6 and the rpGroup hight in line 7. Those numbers are off the wall considering the whole panelbar is only 370 pixels high per the code above.
1) How can I fix those Height params?
2) Any idea what's up with the disappearing scrollbar?
Thanks!
Config is VS2005 / .NET2 / RadControls v2009.1.402.20 / IE7 / Planet Earth / Milky Way