回复 1楼lypvc的帖子
lypvc 你好,
参考代码如下:
- FarPoint.Win.Spread.CellType.ComboBoxCellType combo = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
- private void Form1_Load(object sender, System.EventArgs e)
- {
- string[] cbstr;
- cbstr = new String[] {"One", "Two", "Three"};
- string[] strval;
- strval = new String[] {"1", "2", "3"};
- combo.Items = cbstr;
- combo.ItemData = strval;
- combo.EditorValue = FarPoint.Win.Spread.CellType.EditorValue.ItemData;
- fpSpread1.Sheets[0].Cells[0, 0].CellType = combo;
- }
复制代码 |