FineUI 官方论坛
标题:
MenuCheckBox
[打印本页]
作者:
逍遥
时间:
2014-3-7 22:00
标题:
MenuCheckBox
List<UsersEntity> List = UsersMethod.Get("", "激活");
foreach (UsersEntity u in List)
{
FineUI.MenuCheckBox mc = new FineUI.MenuCheckBox();
mc.Text = u.LoginName;
mc.ID = u.Id;
mc.AutoPostBack = true;
mc.CheckedChanged += new EventHandler<CheckedEventArgs>(MenuSite_CheckedChanged);
btnSiteMenu.Menu.Items.Add(mc);
}
protected void MenuSite_CheckedChanged(object sender, CheckedEventArgs e)
{
StringBuilder selectedSites = new StringBuilder();
foreach (FineUI.MenuItem item in btnSiteMenu.Menu.Items)
{
if (item is MenuCheckBox && (item as MenuCheckBox).Checked)
{
selectedSites.AppendFormat("{0}, ", item.Text);
}
}
Alert.Show("你选择的站点:" + selectedSites.ToString().TrimEnd(", ".ToCharArray()), MessageBoxIcon.Warning); return;
}
事件怎么无效啊???????????
欢迎光临 FineUI 官方论坛 (https://fineui.com/BBS/)
Powered by Discuz! X3.4