Spread没有直接提供对这两个按钮的访问方法,不过可以通过以下代码来操纵这两个按钮:
- protected override void Render(HtmlTextWriter writer)
- {
- //Add a row
- System.Web.UI.WebControls.WebControl btnAdd = FpSpread1.FindControl("Add") as System.Web.UI.WebControls.WebControl;
- btnAdd.Visible = false;
- //Insert a row
- System.Web.UI.WebControls.WebControl btnInsert = FpSpread1.FindControl("Insert") as System.Web.UI.WebControls.WebControl;
- btnInsert.Visible = false;
- base.Render(writer);
- }
复制代码 |