This question is locked. New answers and comments are not allowed.
Hello All,
I thought I posted a question about my issue yesterday, but I cannot find it anymore, hence this new topic.
I created a Window that loads the content from a Partial view. On this partial view is a Telerik ComboBox.
When the page Loads with the window on it I get a Javascript Error:
Microsoft JScript runtime error: Object doesn't support this property or method.
This only happens when I have a ComboBox on the Window. When we remove the ComboBox from the Window it opens fine..
The code we use for the Window:
The code for the Partial View:
Code for the Controller:
Code for Model:
We are using version: 2010.3.1110.
Also please find attached the sample project.
I just followed the code for creating a Window from here: http://demos.telerik.com/aspnet-mvc/window/clientsideapi
What am I doing wrong?
Thanks, once again your help is very much appreciated.
Pim
I thought I posted a question about my issue yesterday, but I cannot find it anymore, hence this new topic.
I created a Window that loads the content from a Partial view. On this partial view is a Telerik ComboBox.
When the page Loads with the window on it I get a Javascript Error:
Microsoft JScript runtime error: Object doesn't support this property or method.
This only happens when I have a ComboBox on the Window. When we remove the ComboBox from the Window it opens fine..
The code we use for the Window:
<%= Html.Telerik().Window() .Name("DeleteObjectWindow") .LoadContentFrom("PopUp", "Home") .Buttons(buttons => buttons.Maximize().Close()) .Width(900) .Height(250) .Modal(true) .Title("Please select item.") .Visible(true) .Draggable(true) %>The code for the Partial View:
<% using (Html.BeginForm()) %><%{%><div class="editor-label"> <%: Html.LabelFor(model => model.Selecteditem) %></div><div class="editor-label"> <%: Html.Telerik().ComboBoxFor(model => model.Selecteditem) .HighlightFirstMatch(true) .BindTo(new SelectList(Model.ListOfSelectItems, "ValueMember", "DisplayMember")) %></div><% } %>Code for the Controller:
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using TelerikMvcApplication1.Models;namespace TelerikMvcApplication1.Controllers{ [HandleError] public class HomeController : Controller { public ActionResult Index() { ViewData["Message"] = "Welcome to ASP.NET MVC!"; return View(); } public ActionResult PopUp() { var testItem = new TestItem(); return PartialView(testItem); } }}Code for Model:
using System;using System.Collections.Generic;using System.Linq;using System.Web;namespace TelerikMvcApplication1.Models{ public class TestItem { public string Selecteditem { get; set; } public List<SelectItem> ListOfSelectItems { get { var listOfItems = new List<SelectItem>(); listOfItems.Add(new SelectItem(){DisplayMember = "One", ValueMember = "1"}); listOfItems.Add(new SelectItem(){DisplayMember = "Two", ValueMember = "2"}); listOfItems.Add(new SelectItem(){DisplayMember = "Three", ValueMember = "3"}); listOfItems.Add(new SelectItem(){DisplayMember = "Four", ValueMember = "4"}); return listOfItems; } } } public class SelectItem { public string DisplayMember{get;set;} public string ValueMember{get;set;} }}We are using version: 2010.3.1110.
Also please find attached the sample project.
I just followed the code for creating a Window from here: http://demos.telerik.com/aspnet-mvc/window/clientsideapi
What am I doing wrong?
Thanks, once again your help is very much appreciated.
Pim