我想更新Spread的一个单元格而保持其他单元格不变
我在前台:
function editStopped() {
var ss = document.getElementById("FpSpread1");
ss.UpdatePostbackData();
ss.CallBack("MyCommand");
}
function window_onload() {
var spread = document.all("FpSpread1");
if (spread != null) {
spread.onDataChanged = editStopped;
}
}
后台:
Private Sub FpSpread1_ButtonCommand3(ByVal sender As Object, ByVal e As FarPoint.Web.Spread.SpreadCommandEventArgs) Handles FpSpread1.ButtonCommand
If e.CommandName = "MyCommand" Then
FpSpread1.Sheets(0).Cells(0, 0).Text = "My Command Worked"
FpSpread1.Sheets(0).Cells(0, 0).BackColor = Drawing.Color.Red
End If
End Sub
这样虽然能把Cells(0, 0)改变,但是同时把其他的单元格也刷新了,请问我该怎么解决? |