回复 2楼zhengkun的帖子
zhengkun 你好,
感谢你的问题反馈。
由于 C1 控件源码是经过混淆处理的,所以在 GetType.ToString 时获取到不可读字符串。
可以通过判断 Editor 的基类来避免这个问题,测试代码如下:
- private void Form1_Load(object sender, EventArgs e)
- {
- Dictionary<string, string> colDic = new Dictionary<string, string>();
- colDic.Add("a", "A");
- colDic.Add("b", "B");
- colDic.Add("c", "C");
- colDic.Add("d", "D");
- colDic.Add("e", "E");
- this.c1FlexGrid1.Cols[1].DataMap = colDic;
- this.c1FlexGrid1.KeyDownEdit += c1FlexGrid1_KeyDownEdit;
- }
- void c1FlexGrid1_KeyDownEdit(object sender, C1.Win.C1FlexGrid.KeyEditEventArgs e)
- {
- if (this.c1FlexGrid1.Editor is ComboBox)
- {
- MessageBox.Show("combo");
- }
- }
复制代码
如果有其他问题,欢迎继续提出,
谢谢 |