RadioButtonList in Custom Module
Hello,
I'm following the documentation "How to create a basic module" to crate a custom simple module.
I added a RadioButtonList in the module widget but it is not rendered. I see a blank block other than the radio buttons.
Any suggestion?
Thank you
DropDownList is not rendered as well.
No problems with RadComBox, asp:textbox or asp:RadioButton. But I couldn't manage to work with DropDownList and RadioButtonList.
Hello Oguz,
case RenderChoicesAs.CheckBoxes: return this.CheckBoxes; case RenderChoicesAs.DropDown: return this.DropDown; case RenderChoicesAs.ListBox: return this.ListBox; case RenderChoicesAs.HorizontalRadioButtons: case RenderChoicesAs.RadioButtons: return this.RadioButtons; Hi Victor,
I'm following the "How to create a basic module" tutorial (www.sitefinity.com/.../how-to-create-a-basic-module.aspx).
I added the DropDownList and RadioButtonList to the Upload Form Widget.
Thank you.
Hi Oguz,
Please include the code of your custom module so I could replicate the issue you have.
All the best,
Victor Velev
the Telerik team
Hi Victor,
I added the code. I have only modified the "JobApplicationUpload.ascx" file and added some code and marked that block with "<!-- DROPDOWN LIST TEST START -->" between line 14-30
Thank you.
01.<%@ Control Language="C#" %>02.<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>03.<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sitefinity" %>04.<telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all"></telerik:RadFormDecorator>05. 06.<sitefinity:Message07. runat="server"08. ID="message"09. ElementTag="div" 10. RemoveAfter="30000" 11. FadeDuration="10" />12. 13. 14. <!-- DROPDOWN LIST TEST START -->15. 16. <asp:Label ID="lblDropDownTst" Text="Test Dropdown" runat="server" AssociatedControlID="ddlTest" Font-Bold="True"/><br />17. 18. <asp:DropDownList id="ddlTest"19. AutoPostBack="True" 20. runat="server">21. 22. <asp:ListItem Selected="True" Value="1"> 1 </asp:ListItem>23. <asp:ListItem Value="2"> 2 </asp:ListItem>24. 25. </asp:DropDownList>26. 27.<br /><br />28. 29. 30. <!-- DROPDOWN LIST TEST END -->31. 32. 33.<asp:Label ID="Label1" Text="First Name" runat="server" AssociatedControlID="FirstName" Font-Bold="True"/><br />34. 35.<asp:TextBox ID="FirstName" runat="server" Width="100%" ValidationGroup="CVUpload"/>36.<asp:RequiredFieldValidator ID="FirstNameRequired" runat="server" CssClass="sfError" Display="Dynamic" ValidationGroup="CVUpload"37. ControlToValidate="FirstName" ErrorMessage="First name required" SetFocusOnError="true">38. <strong>First name required</strong>39. </asp:RequiredFieldValidator>40.<br /><br />41. 42.<asp:Label ID="Label2" Text="Last Name" runat="server" AssociatedControlID="LastName" Font-Bold="True"/><br />43. 44.<asp:TextBox ID="LastName" runat="server" Width="100%" ValidationGroup="CVUpload" />45.<asp:RequiredFieldValidator ID="LastNameRequired" runat="server" CssClass="sfError" Display="Dynamic" ValidationGroup="CVUpload"46. ControlToValidate="LastName" ErrorMessage="Last name required" SetFocusOnError="true">47. <strong>Last name required</strong>48. </asp:RequiredFieldValidator>49.<br /><br />50.<asp:Label ID="Label4" Text="Phone Number" runat="server" AssociatedControlID="LastName" Font-Bold="True"/><br />51. 52.<asp:TextBox ID="Phone" runat="server" Width="100%" ValidationGroup="CVUpload"/>53.<asp:RequiredFieldValidator ID="PhoneRequired" runat="server" CssClass="sfError" Display="Dynamic" ValidationGroup="CVUpload"54. ControlToValidate="Phone" ErrorMessage="Phone Number required" SetFocusOnError="true">55. <strong>Last name required</strong>56. </asp:RequiredFieldValidator>57.<br /><br />58.<asp:Label ID="Label5" Text="How Did You Hear About Us?" runat="server" AssociatedControlID="HowDidYouHear" Font-Bold="True"/><br />59. 60.<telerik:RadComboBox ID="HowDidYouHear" runat="server">61.<Items>62. <telerik:RadComboBoxItem runat="server" Text="Internet Ad"/>63. <telerik:RadComboBoxItem runat="server" Text="Mobile Phone Ad"/>64. <telerik:RadComboBoxItem runat="server" Text="Social Network"/>65. <telerik:RadComboBoxItem runat="server" Text="Television Ad"/>66. <telerik:RadComboBoxItem runat="server" Text="Web Link"/>67. <telerik:RadComboBoxItem runat="server" Text="Web Search"/>68. <telerik:RadComboBoxItem runat="server" Text="Magazine Ad"/>69. <telerik:RadComboBoxItem runat="server" Text="Other"/>70.</Items>71.</telerik:RadComboBox>72.<br /><br />73. 74.<asp:Label ID="Label3" Text="Document Upload" runat="server" AssociatedControlID="RadUpload1" Font-Bold="True"/><br />75. 76.<telerik:RadUpload ID="RadUpload1" runat="server" AllowedFileExtensions=".doc,.docx,.pdf,.txt,.rtf,.odt" MaxFileInputsCount="1" Width="100%" InputSize="45" ControlObjectsVisibility="None"/>77.<br />78. 79.<asp:Button runat="server" ID="SubmitButton" Text="Submit" Width="60px" ValidationGroup="CVUpload" CausesValidation="True" />Hello Oguz,
Thank you for getting back to me.
After detailed test it seems there is a bug when rendering the dropdownlist. Please use RadComboBox until the issue is fixed up. I have logged it in our system and it will checked for our next sprint (#109584).
All the best,
Victor Velev
the Telerik team
Please note that, RadioButtonList is not rendered, too. I did not test CheckBoxList.
Thank you.
Hi Oguz, Victor,
I had the same problem with a CheckBoxList. The problem seems to be related to ListItems because the List is existing in code behind just without the ListItems.
I got it running by setting ListItems in code behind during override of SimpleViews InitializeControls(GenericContainer container).
Regards
Udo
Hi Udo ,
Thank you for sharing this workaround about the issue. You can use it until the problem is fixed in our future releases.
Best wishes,
Victor Velev
the Telerik team
Hi
I just came across this old thread while searching for a solution - I have the same problem with a custom control assembly I'm creating for SF4.3 (inheriting SimpleView). Was this ever resolved? Neither DropDownList or CheckBoxList are rendering the items.
Hello Nick,
The issue was not reproduced in later versions of Sitefinity. We have done some tests using different codes, including the one provided by Oguz.
Can you send us the control so we can have a look at it.
Kind regards,
Victor Velev
the Telerik team
Hi,
Hi Nick,
Can you clarify what do you mean by " the provided code does not render html "?
Greetings,
Victor Velev
the Telerik team