回复 3楼usst的帖子
前台不需要添加详细的菜单子节点,仅仅需要添加菜单标记即可:
- <ContextMenus>
- <FarPoint:ContextMenu>
- </FarPoint:ContextMenu>
- </ContextMenus>
复制代码
后台可以进行移除和添加:
- protected void Button1_Click(object sender, EventArgs e)
- {
- this.FpSpread1.ContextMenus[FarPoint.Web.Spread.ContextMenuType.Viewport].Items.RemoveAt(0);
- this.FpSpread1.ContextMenus[FarPoint.Web.Spread.ContextMenuType.Viewport].Items.Add(new FarPoint.Web.Spread.MenuItem("增加菜单"));
- }
复制代码
后台可以自由控制菜单选项。详细请参考附件demo:
18215.zip
(2.1 KB, 下载次数: 197)
|