FineUI 官方论坛
标题:
求助:关闭子窗口刷新父窗口局部控件的问题
[打印本页]
作者:
葉公
时间:
2016-4-29 09:58
标题:
求助:关闭子窗口刷新父窗口局部控件的问题
我做了个功能,就是在子窗口配置父窗口的TAB控件加载PANEL的功能,但是子窗口调用回发事件后,父窗口的TAB控件未进行加载
代码如下:
/// <summary>
/// 动态加载panel页
/// </summary>
/// <param name="colWidth"></param>
private void Bind(int colWidth)
{
Tab1.Items.Clear();
FineUI.Panel px = new FineUI.Panel();
px.Items.Clear();
px.ShowBorder = false;
px.ShowHeader = false;
switch (colWidth)
{
case 1: px.ColumnWidth = "100%"; break;
case 2: px.ColumnWidth = "50%"; break;
case 3: px.ColumnWidth = "33%"; break;
}
ds = InitDeskByUserId(Session["AccountID"].ToString());
FineUI.Panel p;
if (ds.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
p = new FineUI.Panel();
p.ID = "DeskPanel" + i.ToString();
p.Title = ds.Tables[0].Rows[i]["DESKNAME"].ToString();
p.EnableIFrame = true;
p.IFrameUrl = ds.Tables[0].Rows[i]["DESKURL"].ToString();
p.AutoScroll = true;
p.ShowBorder = false;
px.Items.Add(p);
}
Tab1.Items.Add(px);
}
}
//回发事件,绑定
protected void windowSourceCode_Close(object sender, EventArgs e)
{
Bind(int.Parse(ViewState["colWidth"].ToString()));
}
///子窗口事件,回发父窗口
protected void btnAdd_Click(object sender, EventArgs e)
{
mDA.Delete(Session["AccountID"].ToString());
foreach (FineUI.CheckItem li in cblDesk.Items)
{
if (li.Selected == true)
{
model.DESKID = li.Value;
model.USERID = Session["AccountID"].ToString();
mDA.Add(model);
}
}
Alert.ShowInParent("配置完毕。", string.Empty, ActiveWindow.GetHidePostBackReference());
}
欢迎光临 FineUI 官方论坛 (https://fineui.com/bbs/)
Powered by Discuz! X3.4