回复 1楼费跃的帖子
可以通过设置 CheckBoxCellType 的 AutoPostBack 属性为 true,通过 ButtonCommand 来获取:
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- FarPoint.Web.Spread.CheckBoxCellType c = new FarPoint.Web.Spread.CheckBoxCellType();
- c.AutoPostBack = true;
- FpSpread1.ActiveSheetView.Cells[0, 0].CellType = c;
- }
- protected void FpSpread1_ButtonCommand(object sender, FarPoint.Web.Spread.SpreadCommandEventArgs e)
- {
- int activeRow = e.SheetView.ActiveRow;
- int activeCol = e.SheetView.ActiveColumn;
- object value = this.FpSpread1.ActiveSheetView.Cells[activeRow, activeCol].Value;
- }
复制代码 |