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

[Solved] help!! disable() is not a function

0 Answers 47 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
romian
Top achievements
Rank 1
romian asked on 17 Nov 2010, 09:24 PM
Hi, I have a problem with comboBox disable/enable
I obtain that error:

combobox.disable is not a function in line combobox.disable();

thanks.

the view:

<%@ Page Title=
"" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MASS.ViewModel.ConsultandoOsmasViewModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    title
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> 
            <%= Html.Telerik().ComboBox()
                              .Name("ComboBox")                                                                                          
                              .BindTo(Model.Sectores)                                       
            %>
             <script type="text/javascript">
                 function onComboLoad() {
                     //"ComboBox" is the value specified by the Name() method.
                     var combobox = $("#ComboBox").data("tComboBox");
                     alert(combobox);
                     combobox.disable();
                 }                                     
    </script>
  
</asp:Content>
the siteMaster:
 
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <link href="/Content/Site.css" rel="stylesheet" type="text/css" />
    <title>
        <asp:ContentPlaceHolder ID="TitleContent" runat="server" />
    </title>
    <% Html.Telerik().StyleSheetRegistrar()
               .DefaultGroup(group => group
                   .Add("telerik.common.min.css")
                   .Add("telerik.windows7.min.css"))               
                   .Render();
    %>
  
      
</head>
<body>
    <div id="container">
        

    </div>
    <%
        Html.Telerik().ScriptRegistrar()
                      .DefaultGroup(group => group
                                       .Add("MicrosoftAjax.js")
                                       .Add("MicrosoftMvcValidation.js")
                                       .Add("MicrosoftMvcAjax.js")
                                       .Compress(true))
                      .Globalization(true)
                     .OnDocumentReady("onComboLoad();")
                     .Render();
    %>
</body>
</html>
Tags
ComboBox
Asked by
romian
Top achievements
Rank 1
Share this question
or