Foxtable(狐表)用户栏目专家坐堂 → [求助]ComboBox 不绑定字段 显示列是字符 取值列是整型 报错


  共有2079人关注过本帖平板打印复制链接

主题:[求助]ComboBox 不绑定字段 显示列是字符 取值列是整型 报错

帅哥哟,离线,有人找我吗?
haibingxinyi
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:婴狐 帖子:40 积分:297 威望:0 精华:0 注册:2019/7/3 10:54:00
[求助]ComboBox 不绑定字段 显示列是字符 取值列是整型 报错  发帖心情 Post By:2019/8/5 19:18:00 [只看该作者]

如题,ComboBox 没有绑定字段,设置了数据表,显示列:名称 取值列:_Identify 下拉的时候就报错 提示输入的字符串格式不正确 如下: 有关调用实时(JIT)调试而不是此对话框的详细信息, 请参见此消息的结尾。 ************** 异常文本 ************** System.FormatException: 输入字符串的格式不正确。 在 System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) 在 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) 在 System.String.System.IConvertible.ToInt32(IFormatProvider provider) 在 System.Data.Common.Int32Storage.ConvertValue(Object value) 在 System.Data.Index.FindNodeByKey(Object originalKey) 在 System.Data.Index.FindRecordByKey(Object key) 在 System.Data.DataView.FindByKey(Object key) 在 Foxtable.oOOo 0Oo.o O 0OO () 在 Foxtable.oOOo 0Oo.o  oO0 o(Object A_0, EventArgs A_1) 在 System.Windows.Forms.Control.OnGotFocus(EventArgs e) 在 System.Windows.Forms.TextBox.OnGotFocus(EventArgs e) 在 C1.Win.C1Input.C1TextBox.OnGotFocus(EventArgs e) 在 C1.Win.C1Input.C1DropDownControl.OnGotFocus(EventArgs e) 在 System.Windows.Forms.Control.WmSetFocus(Message& m) 在 System.Windows.Forms.Control.WndProc(Message& m) 在 System.Windows.Forms.TextBoxBase.WndProc(Message& m) 在 System.Windows.Forms.TextBox.WndProc(Message& m) 在 C1.Win.C1Input.C1TextBox.WndProc(Message& m) 在 C1.Win.C1Input.C1DropDownControl.WndProc(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) 在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) 如果把取值列改成字符串格式的如名称就正常。 但是:如果将此ComboBox 绑定上字段,他就不会报错了。 请教如何解决?

 回到顶部