jpg
protected void Fps1_ButtonCommand(object sender, SpreadCommandEventArgs e)
{
int ncol;
ncol = fps1.ActiveSheetView.ActiveColumn;
if (ncol == 0)
{
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Save", "editSavioProject();", true);
}
}
JS
function editSavioProject() {
var spread = document.all("fps1");
var nrow = spread.ActiveRow; //取不到值
if (nrow != null && nrow >= 0) {
var colcount = spread.GetColCount(); //用不了GetColCount var number = new Date();
var sVal = "";
for (i = 2; i < colcount; i++) {
if (i > 2) {
sVal += ",";
}
sVal += spread.GetValue(nrow, i);
}
var rv = OpenModelForm("AddSavioMachineInfo.aspx?Values=" + sVal + "&time" + number, "", "500", "1000");
if (rv != null) {
var s = rv.split(",");
if (s.length > 0) {
for (a = 0; a < s.length; a++) {
spread.SetValue(nrow, a, s[a], true);
}
spread.UpdatePostbackData();
}
}
}
} |
|