回复 3楼guxinghan的帖子
后台可以先设置某列的 CellType,然后再到前台设置即可:
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- string[]cbstr;
- string[]strval;
- cbstr=new String[]{"One","Two","Three"};
- strval=new String[]{"1","2","3"};
- FarPoint.Web.Spread.ComboBoxCellType cb=new FarPoint.Web.Spread.ComboBoxCellType();
- cb.Items=cbstr;
- cb.ShowButton = true;
- this.FpSpread1.ActiveSheetView.Columns[0].CellType = cb;
- }
复制代码
- <script type="text/javascript">
- function addRows() {
- var spread = document.getElementById("FpSpread1");
- spread.Insert();
- FpSpread1.Copy(); // copies the selection to Clipboard
- FpSpread1.SetActiveCell(0, 0); // goes to top of displayed sheet
- FpSpread1.Paste();
- }
- </script>
复制代码 |