Error 'Input string was not in a correct format'


Author
Message
Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I hit error 'Input string was not in a correct format' when click search in browse dialog.



Steps to repduce

1. Drop browsedialog on to form.

2. Specify search fields. Try to have search field that similar with below.

Search Field 1 : Textbox, String, Visible = true

Search Field 2 : Combobox, Integer, Visible = false

Search Field 3 : Textbox, String, Visible = true

3. Specify other properties.

4. Run the form, click browse button, and click search in browse dialog.



Error below would be occurred. The error happen if I have non-character search field set to invisible at the middle of other string search field. It works fine if I move search field 2 after search field3.



FormatException

Input string was not in a correct format.



Source : mscorlib



Stack Trace:

at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)

at System.Int32.Parse(String s)

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.BuildWhereElement(SearchFieldItem SearchField)

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.BuildWhereElement(Int32 ParameterIndex)

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.BuildSearchWhereClause()

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.ExecuteSearch()

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.ProcessCmdKey(Message& msg, Keys keyData)

at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)

at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)

at System.Windows.Forms.TextBoxBase.ProcessCmdKey(Message& msg, Keys keyData)

at System.Windows.Forms.MaskedTextBox.ProcessCmdKey(Message& msg, Keys keyData)

at System.Windows.Forms.Control.PreProcessMessage(Message& msg)

at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)

at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search