Web Binding to RadioButtonList


Author
Message
Govinda Berrio
Govinda Berrio
StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)
Group: StrataFrame Users
Posts: 94, Visits: 481
Hello, 

I am binding a BO property to a RadioButtonList control. 
The business object is empty during the whole test. 
The simple scenario is this: 
  • one page
  • one BO in the ApplicationBasePage
  • on the page, a SF RadioButtonList
  • and an <asp:Button>


The page will load fine once. And, everything looks as it should, the bound control is disabled. 
When I click the Button to initiate a PostBack, the result is the following error below the code.

Does anyone have any insight into this? Is this normal ASP.NET behavior or is there a workaround that does not involve manual binding to the control (BindingDirection="None")?

Thank You, 
Govinda

<SFWeb:RadioButtonList RepeatDirection="Horizontal" 
            ID="rblSolutionType" runat="server" BusinessObjectName="QuoteProduct" 
            BindingField="solution_type_lpk"
            PopulationType="Manual">
</SFWeb:RadioButtonList>


'rblSolutionType' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value

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.ArgumentOutOfRangeException: 'rblSolutionType' has a 
SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value

Source Error: 

An unhandled exception was generated during the execution of the current web request. 
Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 



[ArgumentOutOfRangeException: 'rblSolutionType' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value]
   System.Web.UI.WebControls.ListControl.set_SelectedValue(String value) +9708448

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +92
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +108
   System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) +97
   System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index) +21
   MicroFour.StrataFrame.Business.BusinessLayer.ClearWebControl(IWebBusinessBindable ControlToBind, IWebBinding Binding) +409
   MicroFour.StrataFrame.Business.BusinessLayer.BindDataToWebControl(IWebBusinessBindable ControlToBind, IWebBinding Binding) +1294
   MicroFour.StrataFrame.Business.BusinessLayer.BindDataToWebControlPrimary(IWebBusinessBindable ControlToBind) +80
   MicroFour.StrataFrame.UI.Web.BasePage.BindControls() +358

[UIException: An error occurred while binding data to the web control 'rblSolutionType'.]
   MicroFour.StrataFrame.UI.Web.BasePage.BindControls() +921
   MicroFour.StrataFrame.UI.Web.BasePage.Page_PreRender(Object sender, EventArgs e) +37
   System.Web.UI.Control.OnPreRender(EventArgs e) +92
   System.Web.UI.Control.PreRenderRecursiveInternal() +83
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Govinda Berrio - 10 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search