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

ComboBoxFor not displaying combo when Iframe true

1 Answer 128 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Russ asked on 20 Jun 2014, 04:04 PM
I've spent a couple hours and solved my issue, I think.  If Iframe is true, the Kendo UI Widget is not working as a combobox.  If Iframe is false, it works.  Should I be using Iframe true or false, just not sure why I would care unless a browser does not allow them.  Please explain the difference.

I have a View using the Window and loading content for a partial view and cannot get the ComboBoxFor to show a combobox, it only shows a text box.
I'm showing my View and PartialView below.  Any ideas?  I see in debugger the exact same combobox with a different ID, working perfectly but then the Window is loaded into an iFrame and does not work.
@helper NewProspectWorkflowProject()
    .Title("Add new project")
    .Content("loading user info...")
    .LoadContentFrom("AddProject", "ProspectWorkflow")


<span id="undo" class="k-button">Click here to open the window.</span>

$(document).ready(function() {
.bind("click", function() {


Layout = null;

@model OperationsSite.Models.ProspectWorkflowProject

<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>

@using (Html.BeginForm())


       <div class="editor-label">
               @Html.LabelFor(model => model.projectID)
              @(Html.Kendo().ComboBoxFor(model => model.projectID)
                          .HtmlAttributes(new { style = "width:250px", id = "client_name_dropdown2" })
                           .DataSource(source =>        
                                source.Read(read =>
                                     read.Action("GetClientNames", "ComboBox");
            @Html.ValidationMessageFor(model => model.projectID)

Thank you,


1 Answer, 1 is accepted

Sort by
Petur Subev
Telerik team
answered on 24 Jun 2014, 12:05 PM
Hello Russ,

When using an iframe, the kendo scripts should be added again inside the partial view (if you are returning just a partial view without the layout), because the scripts that are registered on the main page (that contains the window) are not available within the iframe and the combobox cannot be initialized.

Kind Regards,
Petur Subev

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Asked by
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question