提供3000多款全球软件/控件产品
针对软件研发的各个阶段提供专业培训与技术咨询
根据客户需求提供定制化的软件开发服务
全球知名设计软件,显著提升设计质量
打造以经营为中心,实现生产过程透明化管理
帮助企业合理产能分配,提高资源利用率
快速打造数字化生产线,实现全流程追溯
生产过程精准追溯,满足企业合规要求
以六西格玛为理论基础,实现产品质量全数字化管理
通过大屏电子看板,实现车间透明化管理
对设备进行全生命周期管理,提高设备综合利用率
实现设备数据的实时采集与监控
利用数字化技术提升油气勘探的效率和成功率
钻井计划优化、实时监控和风险评估
提供业务洞察与决策支持实现数据驱动决策
我有一个页面使用了Kendoui的combo控件,代码如下:
@(Html.Kendo() .ComboBoxFor(model => model.GenderCode) .Name("GenderCode") .Placeholder("Choose Gender...") .DataTextField("Text") .DataValueField("Value") .BindTo(new List<SelectListItem>() { new SelectListItem() { Text = "Male", Value = "M" }, new SelectListItem() { Text = "Female", Value = "F" } }) .Suggest(true))
但是生成之后变成了这样:
<input data-val="true" data-val-required="Gender Code is required!" id="GenderCode" name="GenderCode" type="text" /><script> jQuery(function(){jQuery("#GenderCode").kendoDropDownList({"dataSource":[{"Text":"Male","Value":"M"},{"Text":"Female","Value":"F"}],"dataTextField":"Text","dataValueField":"Value"});}); </script> <span class="field-validation-valid" data-valmsg-for="GenderCode" data-valmsg-replace="true"></span>
错误"Object [object Object] has no method 'kendoDatePicker'"
于是我去查了一下kendo官网,它的解释是这样的:
JavaScript error that Kendo widgets are unavailable or undefined If jQuery is included
more than once in the page all existing jQuery plugins (including Kendo UI) will be wiped out.
Will also occur if the required Kendo JavaScript files are not included. The following JavaScript
errors will be thrown (depending on the browser): TypeError: Object # has no method 'kendoGrid'
(in Google Chrome) TypeError: $("#Grid").kendoGrid is not a function (in FireFox) Object doesn't
support property or method 'kendoGrid' (in Internet Explorer 9+) Object doesn't support this property
or method (in older versions of Internet Explorer)
然后我检查我的bundles,但是又没有发现哪里多了一个jQuery:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include( "~/Scripts/jquery-ui-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( "~/Scripts/jquery.unobtrusive*", "~/Scripts/jquery.validate*")); // Use the development version of Modernizr to develop with and learn from. Then, when you're // ready for production, use the build tool at //modernizr.com to pick only the tests you need. bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( "~/Scripts/modernizr-*")); bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css")); bundles.Add(new StyleBundle("~/Content/themes/base/css").Include( "~/Content/themes/base/jquery.ui.core.css", "~/Content/themes/base/jquery.ui.resizable.css", "~/Content/themes/base/jquery.ui.selectable.css", "~/Content/themes/base/jquery.ui.accordion.css", "~/Content/themes/base/jquery.ui.autocomplete.css", "~/Content/themes/base/jquery.ui.button.css", "~/Content/themes/base/jquery.ui.dialog.css", "~/Content/themes/base/jquery.ui.slider.css", "~/Content/themes/base/jquery.ui.tabs.css", "~/Content/themes/base/jquery.ui.datepicker.css", "~/Content/themes/base/jquery.ui.progressbar.css", "~/Content/themes/base/jquery.ui.theme.css")); // The Kendo JavaScript bundle bundles.Add(new ScriptBundle("~/bundles/kendo").Include( "~/Scripts/kendo/2013.2.716/kendo.web.min.js", // or kendo.all.min.js if you want to use Kendo UI Web and Kendo UI DataViz "~/Scripts/kendo/2013.2.716/kendo.aspnetmvc.min.js")); // The Kendo CSS bundle bundles.Add(new StyleBundle("~/Content/kendo").Include( "~/Content/kendo/2013.2.716/kendo.common.*", "~/Content/kendo/2013.2.716/kendo.default.*"));
打破零回复...
微信扫码登录
福利更多、资源更多
服务电话
重庆/ 023-68661681
华东/ 13452821722
华南/ 18100878085
华北/ 17347785263
客户支持
技术支持咨询服务
服务热线:400-700-1020
邮箱:sales@pclwef.cn
关注我们
地址 : 重庆市九龙坡区火炬大道69号6幢
登录 慧都网发表评论