回复 45楼langren82的帖子
确实如此。
可以在工具条上添加自定义提交按钮:
添加代码,在 ButtonCommand 中取新增行数值:
- protected override void RenderChildren(HtmlTextWriter writer)
- {
- //自定义按钮调用后台事件
- Table table = FpSpread1.FindControl("cmdTable") as Table;
- TableCell cell1 = new TableCell();
- Button btn1 = new Button();
- btn1.Text = "自定义按钮";
- btn1.Text = "Button1";
- btn1.Attributes.Add("onclick", ClientScript.GetPostBackEventReference(FpSpread1, "BtnCommand,-1,-1") + "; return false;");
- cell1.Controls.Add(btn1);
- table.Rows[0].Cells.Add(cell1);
- base.RenderChildren(writer);
- }
复制代码 |