设置隐藏列的值可以通过调用自定义的Command来实现,比如通过调用SetHiddenCellValue来实现:
后台代码
- protected void FpSpread1_ButtonCommand(object sender, FarPoint.Web.Spread.SpreadCommandEventArgs e)
- {
- switch (e.CommandName)
- {
- case "SetHiddenCellValue":
- Point point = (Point)e.CommandArgument;
- FpSpread1.ActiveSheetView.Cells[point.X, point.Y].Value = HiddenField1.Value;
- break;
- default:
- break;
- }
- }
复制代码
前端JS代码
- function Button1_onclick() {
- document.getElementById("HiddenField1").value = "aaaa";
- FpSpread1.CallBack("SetHiddenCellValue,0,1");
- }
复制代码
6680_Hidden.zip
(8.06 KB, 下载次数: 418)
|