The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Custom radiobuttonlist selected value is null
Posted: 09 Mar 09 2:33 PM
|
Hi all, I am trying to add a custom field to the InsertContact control. It is a asp radiobutton list
<asp:RadioButtonList ID="rgContactGender" runat="server" RepeatDirection="Horizontal" > <asp:ListItem Selected="true" Value="M">Male</asp:ListItem> <asp:ListItem Value="F">Female</asp:ListItem> </asp:RadioButtonList>
I bind it in the OnAddEntityBindings
BindingSource.Bindings.Add(new Sage.Platform.WebPortal.Binding.WebEntityBinding("UserField2", rgContactGender, "SelectedValue")); However when I save the form the UserField2 in the db is null.
To test general functionality I added a textbox and bound that to UserField2 and that saved into the db fine. What am I doing wrong? |
|
|
|
Re: Custom radiobuttonlist selected value is null
Posted: 10 Mar 09 7:02 PM
|
I pulled the section below from a form I still had in AA so its a standard Slx radiogroup. I noticed in had a text property in there too. Hope it give you some direction... ----------------------------------------------------
Value="<%$ resources: rgApprove_item0.Value %>" /> Value="<%$ resources: rgApprove_item1.Value %>" />
|
|
|
| |
| |
|
Re: Custom radiobuttonlist selected value is null
Posted: 11 Mar 09 10:32 AM
|
Thanks so much for responding.
It does not help me though. I am trying to get the value to be bound to the db field. In a normal asp.net form in a post back I would rgContactGender.SelectedValue and that would return either "M" or "F" and this is what I want to save in the db. F
For some reason the way that sales logix does binding is not what I expected. BindingSource.Bindings.Add(new Sage.Platform.WebPortal.Binding.WebEntityBinding("UserField2", rgContactGender, "SelectedValue"));
If no one has any ideas on this does anyone know what the syntax is for a saleslogix radio group. The help files said there is one but I cannot find usage of it anywhere. |
|
|
|
Re: Custom radiobuttonlist selected value is null
Posted: 11 Mar 09 10:32 AM
|
Thanks so much for responding.
It does not help me though. I am trying to get the value to be bound to the db field. In a normal asp.net form in a post back I would rgContactGender.SelectedValue and that would return either "M" or "F" and this is what I want to save in the db. F
For some reason the way that sales logix does binding is not what I expected. BindingSource.Bindings.Add(new Sage.Platform.WebPortal.Binding.WebEntityBinding("UserField2", rgContactGender, "SelectedValue"));
If no one has any ideas on this does anyone know what the syntax is for a saleslogix radio group. The help files said there is one but I cannot find usage of it anywhere. |
|
|
|
Re: Custom radiobuttonlist selected value is null
Posted: 11 Mar 09 10:32 AM
|
Thanks so much for responding.
It does not help me though. I am trying to get the value to be bound to the db field. In a normal asp.net form in a post back I would rgContactGender.SelectedValue and that would return either "M" or "F" and this is what I want to save in the db. F
For some reason the way that sales logix does binding is not what I expected. BindingSource.Bindings.Add(new Sage.Platform.WebPortal.Binding.WebEntityBinding("UserField2", rgContactGender, "SelectedValue"));
If no one has any ideas on this does anyone know what the syntax is for a saleslogix radio group. The help files said there is one but I cannot find usage of it anywhere. |
|
|
|
Re: Custom radiobuttonlist selected value is null
Posted: 11 Mar 09 11:14 AM
|
I was trying to copy\paste the oob slx radio group for you but the forum mis-interpets some of the code and strips it out.
I would suggest creating a simple form with your radia group on it and then open up the ascx file after you deploy it and see what they give you. |
|
|
|
Re: Custom radiobuttonlist selected value is null
Posted: 13 Mar 09 10:57 AM
|
So figured out what I was doing wrong
instead of
BindingSource.Bindings.Add(new Sage.Platform.WebPortal.Binding.WebEntityBinding("UserField2", rgContactGender, "SelectedValue"));
I should have used BindingSource.Bindings.Add(new Sage.Platform.WebPortal.Binding.WebEntityBinding("UserField2", rgContactGender, "Text"));
Thanks, Daria
|
|
|
|