DEVEXPRESS-MENU控件学习
AspxMenu:Method: FindByText
目的:通过查询一个菜单并在该菜单下追加指定子菜单
Code
protected void AddSubMenu_Click(object sender, EventArgs e)
{
DevExpress.Web.ASPxMenu.MenuItem menuItem = dynMenu.Items.FindByText("SubMenu2");
for (int i = 0; i < 10; i++)
{
menuItem.Items.Add(new DevExpress.Web.ASPxMenu.MenuItem()
{
Text = String.Format("menu{0}", i)
}
);
}
}
posted on
2009-08-19 14:31
forrestsun
阅读(
650)
评论()
编辑
收藏
举报