回复 1楼flycatki的帖子
你好,由于 Spread 内部机制问题,需要通过重写 UpdateCommand 实现,测试代码如下:
- protected override void Render(HtmlTextWriter writer)
- {
- WebControl update = this.FpSpread1.FindControl("Update") as WebControl;
- update.Attributes.Add("onclick", ClientScript.GetPostBackEventReference(FpSpread1, "Update,-1,-1") + "; return false;");
- base.Render(writer);
- }
- protected void FpSpread1_UpdateCommand(object sender, FarPoint.Web.Spread.SpreadCommandEventArgs e)
- {
- ClientScript.RegisterStartupScript(this.GetType(), "newwin", "<script type ='text/javascript'> alert('UpdateCommand Test')</script>");
- this.TextBox1.Text = "dd";
- }
复制代码 |