你需要的功能请参考下面的代码:- protected void Page_Load(object sender, EventArgs e)
- {
- this.FpSpread1.Sheets.Count = 3;
-
- // 如果想隐藏整个CommandBar,可以使用下面的代码
- this.FpSpread1.CommandBar.Visible = false;
- }
复制代码 此外,如果只想隐藏某个按钮可以使用下面的方法:- protected override void Render(HtmlTextWriter writer)
- {
- // 如果只想隐藏部分按钮可以实现下面的代码
- //// 隐藏打印按钮
- //WebControl print = FpSpread1.FindControl("Print") as WebControl;
- //print.Visible = false;
- //// 隐藏剪切按钮
- //WebControl cut = FpSpread1.FindControl("Clear") as WebControl;
- //cut.Visible = false;
- base.Render(writer);
- }
复制代码 |