Radpanelbar 折叠/展开问题
伙计们,我对 Telerik 的 RadPanelBar 控件有疑问。 我有 2009 年 Q1 版本的控件。 我有以下 ASP.NET 代码:
<telerik:RadPanelBar Width="297px" ID="RadPanelBar1" runat="server" Skin="Web20" AllowCollapseAllItems="True" ExpandMode="SingleExpandedItem" PersistStateInCookie="True">
<Items>
<telerik:RadPanelItem runat="server" Text="Standard Reports" Expanded="True">
<ItemTemplate>
... Standard HTML Template code here ...
</ItemTemplate>
</telerik:RadPanelItem>
<telerik:RadPanelItem runat="server" Expanded="false" Text="NonStandard Reports">
<ItemTemplate>
<asp:Label runat="server" Text="test"></asp:Label>
</ItemTemplate>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelBar>
一切正常,但我无法展开或折叠标头。 当我将鼠标悬停在标题上时,我的光标会变成手形,但是当我单击标题时没有任何反应。 有人可以帮我吗?
谢谢
Guys, I am having an issue with Telerik's RadPanelBar control. I have the Q1 2009 version of the controls. I have the follow ASP.NET code:
<telerik:RadPanelBar Width="297px" ID="RadPanelBar1" runat="server" Skin="Web20" AllowCollapseAllItems="True" ExpandMode="SingleExpandedItem" PersistStateInCookie="True">
<Items>
<telerik:RadPanelItem runat="server" Text="Standard Reports" Expanded="True">
<ItemTemplate>
... Standard HTML Template code here ...
</ItemTemplate>
</telerik:RadPanelItem>
<telerik:RadPanelItem runat="server" Expanded="false" Text="NonStandard Reports">
<ItemTemplate>
<asp:Label runat="server" Text="test"></asp:Label>
</ItemTemplate>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelBar>
Everything works fine, except I cannot expand or collapase the headers. My cursor changes to a hand when I hover over the headers, however nothing happens when I click on the header. Can someone help me out?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您设置顶级项目的 ItemTemplate - 您将定义项目的内容而不是可折叠区域。 要解决该问题,请定义一个子项并设置其 ItemTemplate 属性:
我希望这会有所帮助!
If you set the ItemTemplate of top level items - you will define the content of the item not the collapsible area. To solve the problem define a child item and set its ItemTemplate property instead:
I hope this helps!
您的页面上有 telerik:RadScriptManager 吗?
Do you have a telerik:RadScriptManager on the page?
您在 ItemTemplate 中添加数据绑定控件时是否尝试过上述方法?
例如,如果您在此处编写了“...标准 HTML 模板代码...”来放置:
我的 ItemTemplate 始终为空。 我正在绑定到 ICollection。 我不明白为什么这不起作用......
Did you try the above method when adding databound controls in the ItemTemplate?
So for instance where you have written "... Standard HTML Template code here ..." to put:
My ItemTemplate is always empty. I'm binding to an ICollection. I can't figure out why this isn't working...
您可以使用内容模板:
You can use ContentTemplate: