asp.net mvc 中怎么使用 ContextMenu? 用如下代码不好使。
- public void FpSpread1_Load(object sender, EventArgs e)
- {
- FpSpread sp = sender as FpSpread;
- if (!sp.Page.IsPostBack)
- {
- sp.Rows.Count = 20;
- sp.Height = 400;
- sp.Width = 800;
- FarPoint.Web.Spread.ContextMenu rowMenu = new FarPoint.Web.Spread.ContextMenu();
- rowMenu.Type = FarPoint.Web.Spread.ContextMenuType.RowHeader;
- rowMenu.Items.Add(new FarPoint.Web.Spread.MenuItem("Add"));
- rowMenu.Items.Add(new FarPoint.Web.Spread.MenuItem("Delete"));
- sp.ContextMenus.Add(rowMenu);
- }
-
- }
- public void FpSpread1_PreRender(object sender, EventArgs e)
- {
- }
- [MvcSpreadEvent("Init", "FpSpread1")]
- private void _init(object sender, EventArgs e)
- {
- }
复制代码 |
|