回复 1楼noahark的帖子
关闭 Spread ViewState 可以通过以下两种方法获取更改单元格值:
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- this.FpSpread1.EnableViewState = false;
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- //先保存,再获取
- this.FpSpread1.SaveChanges();
- string text = this.FpSpread1.Sheets[0].Cells[1, 1].Text;
- }
- protected void FpSpread1_UpdateCommand(object sender, FarPoint.Web.Spread.SpreadCommandEventArgs e)
- {
- //通过 UpdateCommand 参数获取
- ArrayList al = e.EditValues;
- }
复制代码 |