抱歉,这个问题意外的让你等了这么久。还请你见谅。
目前是这样的,如果要在UpdateCommend中修改Spread以外的控件的值,需要重写UpdateCommend。代码如下:
- 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";
- }
复制代码
不过我建议你看有没有可能换个时机去修改textbox的值? |