回复 1楼zjutwb的帖子
可以通过如下方法设置:
首先,设置第一列的CellType为CurrencyCellType类型
接着,设置第一列的第二行CellType为ComboBoxCellType类型
- fpSpread1.ActiveSheet.Columns[0].CellType = new FarPoint.Win.Spread.CellType.CurrencyCellType();
- FarPoint.Win.Spread.CellType.ComboBoxCellType cmbocell = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
- cmbocell.Items = (new String[] { "January", "February", "March", "April", "May", "June" });
- cmbocell.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows;
- cmbocell.AutoSearch = FarPoint.Win.AutoSearch.SingleCharacter;
- cmbocell.Editable = true;
- cmbocell.ListAlignment = FarPoint.Win.ListAlignment.Left;
- cmbocell.ListWidth = 0;
- cmbocell.MaxDrop = 4;
- fpSpread1.Sheets[0].Cells[1, 0].CellType = cmbocell;
复制代码
截图如下:
|