FineUI 官方论坛
标题:
动态添加的AccordionPane控件,不能改变它的Collapsed属性
[打印本页]
作者:
Lisa
时间:
2013-6-4 17:29
标题:
动态添加的AccordionPane控件,不能改变它的Collapsed属性
本帖最后由 Lisa 于 2013-6-4 17:33 编辑
动态添加的AccordionPane控件,可以改变Title属性,但是不能改变它的Collapsed属性
上代码
<body>
<x:PageManager ID="PageManager1" runat="server" />
<form id="form1" runat="server">
<x:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click"></x:Button>
<x:Button ID="Button2" runat="server" Text="EmpBt"></x:Button>
<x:Accordion ID="Accordion1" runat="server" ShowBorder="false" ShowCollapseTool="True" ShowHeader="false" Title="Accordion" Height="300">
<Panes>
</Panes>
</x:Accordion>
</form>
</body>
复制代码
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
AccordionPane APane1 = Accordion1.FindControl("APane1") as AccordionPane;
APane1.Expanded = false;
APane1.Title = "APane1";
APane1.Height = 300;
AccordionPane APane2 = Accordion1.FindControl("APane2") as AccordionPane;
APane2.Expanded = false;
APane2.Title = "APane2";
}
}
protected void Page_Init(object sender, EventArgs e)
{
AccordionPane APane1 = new AccordionPane();
Accordion1.Panes.Add(APane1);
APane1.ID = "APane1";
AccordionPane APane2 = new AccordionPane();
Accordion1.Panes.Add(APane2);
APane2.ID = "APane2";
}
protected void Button1_Click(object sender, EventArgs e)
{
AccordionPane APane = Accordion1.FindControl("APane1") as AccordionPane;
APane.Title = "changed Apane1";
APane.Collapsed = false;
}
复制代码
点击Button1之后,Title改变了,但是不能由收缩状态变为展开状态
请大家帮忙看看时怎么回事,是不是Bug
作者:
Lisa
时间:
2013-6-17 09:57
自己顶一下
欢迎光临 FineUI 官方论坛 (https://fineui.com/bbs/)
Powered by Discuz! X3.4