Little trouble with Two Way binding.


Author
Message
Justin Buist
Justin Buist
StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)
Group: Forum Members
Posts: 17, Visits: 81
I'm cleaning up my application and trying to make better use of SF as I do it. One of the things I'm trying to do is the following:



I have a page for modifying my Company BO. Every Textbox is tied to a field of the Customer BO except for one: The Status ID. That one's a Dropdownlist that is tied to the Status BO, but the StatusID is in the Company BO.



At the top of the page there's a Dropdownlist that selects what company you want to edit.



Seems simple enough.



When you select a company from the top DDL that has a NULL StatusID everything works fine -- and the Status DDL is just an empty list.



Cool.



Now, when I try and pick a different Company from the top DDL this is what I get:



Input string was not in a correct format. 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.



Exception Details: System.FormatException: Input string was not in a correct format.



....





[FormatException: Input string was not in a correct format.]

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

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

System.Int32.Parse(String s) +20

MicroFour.StrataFrame.Data.ObjectConverter.ConvertValue(Object InputValue, Type InputType, Type OutputType, String FormatString) +628



[InvalidOperationException: The input value could not be converted to the output type.]

MicroFour.StrataFrame.Data.ObjectConverter.ConvertValue(Object InputValue, Type InputType, Type OutputType, String FormatString) +2720

MicroFour.StrataFrame.Data.ObjectConverter.ConvertValue(Object InputValue, Type OutputType) +64

MicroFour.StrataFrame.Business.BusinessLayer.BindDataFromWebControl(IWebBusinessBindable ControlFromBind, IWebBinding Binding) +598

MicroFour.StrataFrame.UI.Web.BasePage.BindBackControls() +227



[UIException: An error occurred while binding data to the web control 'ddlCompanyStatus'.]

MicroFour.StrataFrame.UI.Web.BasePage.BindBackControls() +579

MicroFour.StrataFrame.UI.Web.BasePage.Page_PreLoad(Object sender, EventArgs e) +83

System.EventHandler.Invoke(Object sender, EventArgs e) +0

System.Web.UI.Page.OnPreLoad(EventArgs e) +86

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +948





Any suggestions? For the life of me I can't see where I went awry here. If I change the binding to anything but TwoWay the page "works" in the sense that it doesn't blow up, but naturally the Company.StatusID either isn't updated from the UI or the UI isn't representing what's in the DB.
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