Using a RadComboBox in an MVC 2 user control?

Thread is closed for posting
4 posts, 0 answers
  1. Harvey
    Harvey avatar
    4 posts
    Member since:
    Jul 2010

    Posted 15 Jul 2010 Link to this post

    I have successfully used a RadComboBox on an MVC 2 View page (using Visual Studio 2010).

    I needed to use one inside an MVC user control so added a RadComboBox and RadScriptManager to it ...
    but I get an error appearing in the design view of the user control for both the RadComboBox and the RadScriptManager
    "Value cannot be null. Parameter name: frameworkName" -- see attached screenshot.

    It runs ok but the combo box in the user control is unresponsive - it doesn't respond to a clicking on it.

    Here is the code below for the user control (.ascx)

    Some help would be appreciated,
    Thanks,

    Harvey

    <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BHPAHM.Models.InspectionSearchViewData>" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
     
        <% using (Html.BeginForm()) {%>
            <%: Html.ValidationSummary(true) %>
             
                <table>
                <tr>
                <td>
                <div class="editor-label">
                    Entry Type
                </div>
                </td>
                <td>
                <div class="editor-field">
                    <%: Html.DropDownListFor(model => model.EntryTypeId, new SelectList(Model.EntryTypes, "ID", "Name"))%>
                    <%: Html.ValidationMessageFor(model => model.EntryTypeId)%>
                </div>
                </td>
                </tr>
                <tr>
                <td>
                <div class="editor-label">
                    Location
                </div>
                </td>
                <td>
                <div class="editor-field">
                    <%: Html.DropDownListFor(model => model.LocationId, new SelectList(Model.Locations, "ID", "Name"))%>
                    <%: Html.ValidationMessageFor(model => model.LocationId)%>
                </div>
                </td>
                </tr>
                <tr>
                <td>
                <div class="editor-label">
                    Equipment
                </div>
                </td>
                <td>
                <div class="editor-field">
                    <%: Html.DropDownListFor(model => model.EquipmentId, new SelectList(Model.Equipment, "ID", "Name"))%>
                    <%: Html.ValidationMessageFor(model => model.EquipmentId)%>
                </div>
                </td>
                </tr>
                <tr>
                <td>
                <div class="editor-label">
                    Inspection Type
                </div>
                </td>
                <td>
                <div class="editor-field">
                    <%: Html.DropDownListFor(model => model.InspectionTypeId, new SelectList(Model.InspectionTypes, "ID", "Name"))%>
                    <%: Html.ValidationMessageFor(model => model.InspectionTypeId)%>
                </div>
                </td>
                </tr>
     
                <tr>
                <td>
                Example RadComboBox
                </td>
                <td>
                 
                    <telerik:RadComboBox ID="RadComboBox1" Runat="server">
                        <Items>
                            <telerik:RadComboBoxItem Text="One" Value="1" />
                            <telerik:RadComboBoxItem Text="Two" Value="2" />
                            <telerik:RadComboBoxItem Text="Three" Value="3" />
                            <telerik:RadComboBoxItem Text="Four" Value="4" />
                        </Items>
                    </telerik:RadComboBox>
                    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" >
                    </telerik:RadScriptManager>
     
                </td>
                </tr>
     
                </table>
     
                <p>
                    <input type="submit" value="Search" />
                </p>
     
                <p>
                Property1 = <%: ViewData["Property1"] %> <br />
                Property2 = <%: ViewData["Property2"] %>
                </p>
     
     
        <% } %>

  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 15 Jul 2010 Link to this post

    Hello Harvey,

    This is indeed a strange design-time error and we have not been contacted with regards to similar issue before. Have you considered using the combobox MVC component introduced in the current Q2 2010 BETA release of our MVC suite as a replacement? It incorporates three extensions - dropdown list, combobox and auto-complete textbox, which can be used in conjunction with your preferences and schema.

    Kind regards,
    Sebastian
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Harvey
    Harvey avatar
    4 posts
    Member since:
    Jul 2010

    Posted 15 Jul 2010 Link to this post

    Thanks for the quick reply - that's unfortunate that the mvc combobox isn't in the mvc release that we've just purchased (Q1 2010) ... however we may decide to use the beta version for our project if it becomes a must have...
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 15 Jul 2010 Link to this post

    Hello Harvey,

    Note that the components from the current Telerik MVC Q2 2010 BETA release will become official along with the SP1 releases of the other product lines (probably in about a month). With your purchase of the Telerik Premium Collection with Subscription you will receive them free of charge.

    Best regards,
    Sebastian
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top