This is a migrated thread and some comments may be shown as answers.

[Solved] RadComboBox disabled in MVC (Partial View)

1 Answer 146 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Bojan
Top achievements
Rank 1
Bojan asked on 27 Nov 2009, 05:27 PM
Hi,

I found a blog with explanation and example of using RadcomboBox in MVC with LoadOnDemand.
I used the same version of Telerik.Web.UI and the same code but combo box on my page is totally disabled. RadComboBox in my case is placed in a partial view. I read somewhere that there is a problem with css styles if RadControls are placed in partial views but I couldn't find the solution to this.
However, when I placed it in a regular view page (non partial view) I got exception stating that control could not be modified inside server tags <%..%>. For that I found numerous solutions but none worked for me.
Do you have any suggestion of how to make ComboBox operational in partial view?
Do I maybe have to refer to all the JavaScript files needed for RadComboBox directly on the view page?

Thanks in advance.

Here's the sample of the partial view, if it means anything:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<EmailMarketing.Web.Models.MailingDetailsModel>" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Import Namespace="EmailMarketing.Web" %> 
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> 
<telerik:RadStyleSheetManager runat="server"
</telerik:RadStyleSheetManager> 
<div class="divMailingList"></div> 
<div id="MailingDetailsDiv"
  <div id="MailingData"
    <%= Html.Hidden("Id", Model.Id)%> 
    <div class="MailingDetailsForm"
      <div class="MailingDetailsLabel"
        <label for="MailingTypeId"
          <%= EMResources.MailingDetailsLabelPreferedAddress %></label
      </div> 
      <div class="MailingDetailsValue"
        <telerik:RadComboBox runat="server" ID="AddressTypeId" EnableLoadOnDemand="true" ShowMoreResultsBox="true" EmptyMessage="Type here ..." Height="200px" Enabled="true"
          <WebServiceSettings Path="Mailing" Method="LoadItems" /> 
        </telerik:RadComboBox> 
      </div> 
    </div>    
  </div> 
</div>  

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 01 Dec 2009, 12:01 PM
Hello Bojan,

I have already answer you in the support thread opened on the same matter. I will suggest you to continue our discussion in it in order to avoid any duplication of the posts.

Regards,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
Bojan
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or