FineUI 官方论坛
标题:
CheckBoxList 后台动态生成 SelectedIndexChanged事件方法没有触发
[打印本页]
作者:
huntbbbilly
时间:
2015-3-27 11:00
标题:
CheckBoxList 后台动态生成 SelectedIndexChanged事件方法没有触发
CheckBoxList 后台动态生成 SelectedIndexChanged事件方法没有触发 已经启用AutoPostBack
listName = className;
chkList = new CheckBoxList();
chkList.ID = "chkList"+classID;
chkList.DataTextField = "Name";
chkList.ColumnNumber = 4;
chkList.ColumnWidth = "20px";
chkList.RowHeight = "10px";
chkList.Label = listName;
chkList.DataValueField = "Id";
chkList.AutoPostBack = true;
chkList.SelectedIndexChanged += new EventHandler(chkSelectedIndexChanged);
protected void chkSelectedIndexChanged(object sender, EventArgs e)
{
Alert.ShowInTop("列表三选中项的值:");
}
求高手请教
作者:
David_Cai
时间:
2015-4-6 23:47
要写在OnInit中才会触发
作者:
sanshi
时间:
2015-4-8 12:42
David_Cai 发表于 2015-4-6 23:47
要写在OnInit中才会触发
是的,动态加载控件参考我的博客:
http://www.cnblogs.com/sanshi/archive/2012/11/19/2776672.html
欢迎光临 FineUI 官方论坛 (https://fineui.com/BBS/)
Powered by Discuz! X3.4