回复 10楼一萧一剑的帖子
前台取值和更改值得方法请参考代码:
- <SCRIPT language=javascript>
- function doCalc() {
- var rc = FpSpread1.GetRowCount();
- var total = 0;
- for (var i=0; i<rc-1; i++) {
- var value = parseFloat(FpSpread1.GetValue( i, 0 ));
- total += value;
- }
- if (!isNaN(total))
- FpSpread1.SetValue(n-1, 0, total, true);
- }
- </SCRIPT>
复制代码
Spread 提供了内置后台搜索方法:
- FpSpread1.Sheets.Count = 2;
- FpSpread1.Sheets[0].Cells[1, 1].Tag = "test";
- private void Button1_Click(object sender, System.EventArgs e)
- {
- int x = 0;
- int y = 0;
- int z =0;
- FarPoint.Web.Spread.SearchFoundFlags sff;
- sff = FpSpread1.Search(0, 1, "test", false, false, false, false, false, false, true, 0, 0, 2, 2, ref z, ref x, ref y);
复制代码
具体效率和数据量有关,建议最好能够提供精确的搜索范围:
图片没有上传成功,请您确认下。 |