|
报错代码:
F.enable('Panel1_TabStrip1_Tab1_form1_rowUser11_GridProductColor_tbProductColor_btnProductColor');var f0=F('Panel1_TabStrip1');F('GridProductColor').f_updateTpls("");F('GridProductSize').f_updateTpls("");F.state(f0,{"ActiveTabIndex":1});parent.F.alert('弹出窗口被关闭了');
源代码:
private Grid getGrid(string Id, string Name, string IsRequird, DataSet ds)
{
Button bt = new Button();
bt.ID = "btn" + Id;
bt.Text = "添加";
bt.Click += new EventHandler(btSave_Click);
Grid grid = new Grid();
grid.ID = "Grid"+Id;
// grid.Width = 450;
grid.Height = 150;
grid.AutoScroll = true;
grid.ShowHeader = false;
grid.ShowGridHeader = false;
grid.EnableAlternateRowColor = false;
grid.EnableCollapse = true;
Toolbar tb = new Toolbar();
tb.ID = "tb" + Id;
tb.Items.Add(bt);
grid.Toolbars.Add(tb);
if (ds.Tables.Count > 0)
{
FineUI.BoundField bf;
bf = new FineUI.BoundField();
// bf.DataField = "AttributeSelectName";
bf.HeaderText = Name;
grid.Columns.Add(bf);
grid.DataSource = ds.Tables[0];
grid.DataBind();
}
grid.DataKeyNames = new string[] { "AttributeSelectName" };
return grid;
}
#endregion
只要一绑定数据就出错,页面动太生成的其它控件正常。
|
|