回复 1楼cngrain的帖子
实现代码如下:
- string[] cbstrl;
- string[] strval;
- private void Form1_Load(object sender, EventArgs e)
- {
- FarPoint.Win.Spread.CellType.ComboBoxCellType cbCF = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
- cbstrl = new string[] { "A", "B", "C", "D", "E", "F", "G", "H" };
- strval = new string[] { "1", "2", "3", "4", "5", "6", "7", "8" };
- cbCF.Items = cbstrl;
- cbCF.ItemData = strval;
- fpSpread1.ActiveSheet.Cells[1, 1].CellType = cbCF;
- }
- private void fpSpread1_ComboSelChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
- {
- FarPoint.Win.FpCombo fc = e.EditingControl as FarPoint.Win.FpCombo;
- string text = fc.SelectedItem.ToString();
- int sindex = fc.SelectedIndex;
- string value = strval[sindex];
- }
复制代码
为了给你提供更优质的服务,请对本次服务进行评分。我们会认真对待你提出的宝贵意见,谢谢 |