开发环境win764 ie8.0 FpSpread 4.0.2004.2008
cs代码
protected void Button2_Click(object sender, EventArgs e)
{
StringBuilder script = new StringBuilder();
script.Append("<script language=javascript>");
script.Append("doclick()");
script.Append("</script>");
this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "doclick", script.ToString());
}
asp端js代码
function doclick()
{
var spread = document.getElementById("FpSpread1");
var rc = spread.GetTotalRowCount();
var r = 0;
while (r != rc - 1)
{
r1 = r;
var inc = 0;
while (r1 != -1)
{
var val1 = spread.GetValue(r1, 1);
var val2 = spread.GetValue(r1 + 1, 1);
if (val1 == val2)
{
inc++;
r1++;
}
else
{
var cell = spread.GetCellByRowCol(r, 1);
cell.rowSpan = inc + 1;
r = r1 + 1;
r1 = -1;
}
}
}
alert('Cells with same values merged');
提示 错误: 对象不支持此属性或方法
或者采用帮助文档里的
function AutoSize()
{
FpSpread1。SizeToFit();
}
依然提示错误
是ie不支持还是其他的问题呢 |
|