回复 1楼guangyuxuan的帖子
请使用以下代码测试:
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- FarPoint.Web.Spread.ComboBoxCellType c = new FarPoint.Web.Spread.ComboBoxCellType(new String[] { "One", "Two", "Three" });
- //设置 autopostback 属性,调用FpSpread1_ButtonCommand事件
- c.AutoPostBack = true;
- c.ShowButton = true;
- FpSpread1.ActiveSheetView.Cells[0, 0].CellType = c;
-
- }
- protected void FpSpread1_ButtonCommand(object sender, FarPoint.Web.Spread.SpreadCommandEventArgs e)
- {
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- //首先保存 Spread ,再取值
- this.FpSpread1.SaveChanges();
- string text = this.FpSpread1.Sheets[0].Cells[this.FpSpread1.Sheets[0].ActiveRow, this.FpSpread1.Sheets[0].ActiveColumn].Text;
- string value = this.FpSpread1.Sheets[0].Cells[this.FpSpread1.Sheets[0].ActiveRow, this.FpSpread1.Sheets[0].ActiveColumn].Value.ToString();
- }
复制代码 |