This question is locked. New answers and comments are not allowed.
Hi, I have a problem with comboBox disable/enable
I obtain that error:
combobox.disable is not a function in line combobox.disable();
thanks.
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"><html xmlns="http://www.w3.org/1999/xhtml"><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>