回复 4楼iceman的帖子
您说的这种方法我试了但是遇到一些问题,每次取到的都是第一点击单元格的行和列
- <script language="javascript" type="text/javascript">
- function cellclick() {
- FpSpread1_ActiveCellChanged(event);
- }
- function FpSpread1_ActiveCellChanged(event) {
- var spread = this.document.getElementById("<%=FpSpread1.ClientID %>");
- // spread.CallBack("Button");
- }
- </script>
复制代码
后台代码
- protected void FpSpread1_ButtonCommand(object sender, FarPoint.Web.Spread.SpreadCommandEventArgs e)
- {
- int rownum = e.SheetView.ActiveRow;
- int colnum = e.SheetView.ActiveColumn;
- ExtDatePickCellType Date = new ExtDatePickCellType("FpSpread1");
- Date.HtcPath = "ExtDatePicker.htc";
- FpSpread1.Sheets[0].Cells[rownum, colnum].Text = "2010-12-15";
- FpSpread1.Sheets[0].Cells[rownum, colnum].CellType = Date;
- }
复制代码 |