回复 1楼wode551120的帖子
测试代码如下:
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- //设置显示的sheet数量
- this.FpSpread1.Tab.VisibleCount = 2;
- this.FpSpread1.Sheets.Count = 6;
- }
- /// <summary>
- /// 隐藏 CommandBar 按钮
- /// </summary>
- /// <param name="writer"></param>
- protected override void Render(HtmlTextWriter writer)
- {
- Table tb = this.FpSpread1.FindControl("cmdTable") as Table;
- int cellCount = tb.Rows[0].Cells.Count;
- for (int i = 8 ; i < cellCount; i++)
- {
- tb.Rows[0].Cells[i].Visible = false;
- }
- base.Render(writer);
- }
复制代码 |