如题,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 绑定上字段,他就不会报错了。
请教如何解决?
|