回复 1楼nssolsh的帖子
可以捕获前台 EditStopped 事件,在事件中调用 FpSpread1.CallBack() 方法在后台 ButtonCommand 中同步,这样可以在每次编辑结束后都自动同步。
前台:
- <script language="javascript" type="text/javascript" id="FpSpread1_Script0">
- function FpSpread1_EditStopped(event){
- //Add code to handle your event here.
- var spread = this.document.getElementById("FpSpread1");
- spread.UpdatePostbackData();
- spread.CallBack("button");
- }
- </script>
复制代码
后台:
- protected void FpSpread1_ButtonCommand(object sender, FarPoint.Web.Spread.SpreadCommandEventArgs e)
- {
- this.FpSpread1.SaveChanges();
- }
复制代码
弊端是每次编辑都要和后台进行通信。 |