回复 11楼wangwuliSpread的帖子
后台代码如下:
- protected void FpSpread1_ButtonCommand(object sender, FarPoint.Web.Spread.SpreadCommandEventArgs e)
- {
- int _row = e.SheetView.ActiveRow;
- int _col = e.SheetView.ActiveColumn;
- if (this.FpSpread1.ActiveSheetView.Cells[_row,_col].CellType is ComboBoxCellType)
- {
-
- }
- else
- {
- FarPoint.Web.Spread.ComboBoxCellType cmbocell2 = new FarPoint.Web.Spread.ComboBoxCellType();
- cmbocell2.Items = (new String[] { "综合部", "销售部", "服务部", "产品部", "运维" });
- cmbocell2.AutoPostBack = true;
- FpSpread1.ActiveSheetView.Cells[_row, _col].CellType = cmbocell2;
- this.FpSpread1.ActiveSheetView.Cells[_row, _col].Text = DateTime.Now.Year.ToString();
- cmbocell2.ShowButton = true;
- this.FpSpread1.SaveChanges();
- }
- }
复制代码 |