找回密码
 立即注册

QQ登录

只需一步,快速开始

moriya

论坛元老

78

主题

189

帖子

4万

积分

论坛元老

积分
42318

活字格认证

moriya
论坛元老   /  发表于:2014-3-8 10:47  /   查看:4204  /  回复:1
你好,我绑定ComboBoxCellType时给ItemData绑定数字,为什么使用fpCutBed.ActiveSheet.Cells[row, iCutPartType].Value 不能得到数字而是字符

FarPoint.Win.Spread.CellType.ComboBoxCellType cb1 = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
                string[] cbstrl;
                cbstrl = new string[] { "A", "B", "C", "D", "E", "F", "G", "H" };
                string[] strval;
                strval = new string[] { "1", "2","3","4","5","6","7","8" };
                cb1.Items = cbstrl;
                cb1.ItemData = strval;
                cb1.EditorValueChanged += new EventHandler(cb1_EditorValueChanged);
                fpCutBed.ActiveSheet.Columns[iCutPartType].CellType = cb1;

fpCutBed.ActiveSheet.Cells[row, iCutPartType].Value;

1 个回复

倒序浏览
roger.wang
社区贡献组   /  发表于:2014-3-10 10:45:00
沙发
回复 1楼moriya的帖子

可通过如下博客获得办法,需要通过Value在Items数组查找index,然后在ItemData获得数字。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部