我在我的项目中使用DevExpress MVC GridView,我在GridView的实现过程中遇到了一个有趣的问题。如果在我的视图中不使用任何其他脚本标记,GridView工作正常,但是当我在视图中添加一些脚本时,网格视图看起来很不错但是当我点击New,Edit或其中任何一个链接时,回调会停止工作和装载面板无限展示。任何帮助将不胜感激。
@{
ViewBag.Title = "Create";
Layout = "~/Views/Shared/_DevLayout.cshtml";
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>GIZ/WSIP-Operation Plan</title>
<!-- Bootstrap Core CSS -->
<link rel="stylesheet" href="../../GIZWSIP-FstComponent/css/datepicker.css">
<link rel="stylesheet" href="../../GIZWSIP-FstComponent/css/bootstrap.css">
<link href="../../GIZWSIP-FstComponent/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="../../GIZWSIP-FstComponent/css/agency.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="../../GIZWSIP-FstComponent/font-awesome-4.1.0/css/font-awesome.min.css"
rel="stylesheet" type="text/css">
<link href="../../GIZWSIP-FstComponent/css/datepicker.css"
rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet"
type="text/css">
<link href='http://fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet'
type='text/css'>
<link href='http://fonts.googleapis.com/ css? family= Droid+Serif :400,700,400
rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700'
type='text/css'>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body id="page-top" class="index">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<span class="sr-only">Toggle navigation</span> <span class="icon- bar"></span><span
class="icon-bar"></span><span class="icon-bar"></span>
</button>
<a class="navbar-brand page-scroll" href="#page-top">Operation Plan</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="hidden"><a href="#page-top"></a></li>
<li><a class="page-scroll" href="#services">Create</a> </li>
<li><a class="page-scroll" href="#portfolio">Edit</a> </li>
<li><a class="page-scroll" href="#about">Activities Chart</a> </li>
<li><a class="page-scroll" href="#team">Report</a> </li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<!-- Header -->
<header>
<div class="container">
<div class="intro-text">
<div class="intro-lead-in">
Welcome To Our Studio!</div>
<a href="#services" class="page-scroll btn btn-xl">Tell Me More</a>
</div>
</div>
</header>
<!-- Services Section -->
<section id="services">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading">
Create</h2>
<h3 class="section-subheading text-muted">
Create new Intervention Area and Activities Here.</h3>
</div>
</div>
</div>
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/ jquery/ 1.7/jquery.js"> </script>
</head>
<body>
<div class="container">
<!-------->
<div id="content">
<ul id="tabs" class="nav nav-tabs" data-tabs="tabs">
<li onClick="window.location='http://localhost:53785/firstcmoutputs /Create#services'"><a href="http://localhost:53785/firstcmoutputs/Create#services" data-toggle="tab">Output</a></li>
<li onClick="window.location='http://localhost:53785/firstcmActivities /Create#services'"><a href="http://localhost:53785/firstcmActivities/Create#services" data-toggle="tab">Activities</a></li>
</ul>
<div id="my-tab-content" class="tab-content">
<div class="tab-pane active" id="Output">
<div> </div>
@using (Html.BeginForm())
{
@Html.ValidationSummary(true)
@Html.Partial("_OutputsCreateOrEdit")
}
</div>
</div>
</div>
</div> <!-- container -->
</body>
</html>
</section>
<!-- Portfolio Grid Section -->
<section id="portfolio" class="bg-light-gray">
@Html.Action("GridViewPartial")
</section>
<!-- About Section -->
<section id="about">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading">
About</h2>
<h3 class="section-subheading text-muted">
Lorem ipsum dolor sit amet consectetur.</h3>
</div>
</div>
</section>
<footer>
<div class="container">
<div class="row">
<div class="col-md-4">
<span class="copyright">Copyright © GIZ-WSIP 2014</span>
</div>
<div class="col-md-4">
<ul class="list-inline social-buttons">
<li><a href="#"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-facebook"></i></a></li>
<li><a href="#"><i class="fa fa-linkedin"></i></a></li>
</ul>
</div>
<div class="col-md-4">
<ul class="list-inline quicklinks">
<li><a href="#">Privacy Policy</a> </li>
<li><a href="#">Terms of Use</a> </li>
</ul>
</div>
</div>
</div>
</footer>
<!-- jQuery Version 1.11.0 -->
<script src="../../GIZWSIP-FstComponent/js/jquery-1.11.0.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="../../GIZWSIP-FstComponent/js/bootstrap.min.js"></script>
<!-- Plugin JavaScript -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing /1.3/jquery.easing.min.js"></script>
<script src="../../GIZWSIP-FstComponent/js/classie.js"></script>
<script src="../../GIZWSIP-FstComponent/js/cbpAnimatedHeader.js"></script>
<!-- Contact Form JavaScript -->
<script src="../../GIZWSIP-FstComponent/js/jqBootstrapValidation.js"></script>
<script src="../../GIZWSIP-FstComponent/js/contact_me.js"></script>
<!-- Custom Theme JavaScript -->
<script src="../../GIZWSIP-FstComponent/js/agency.js"></script>
<script src="../../GIZWSIP-FstComponent/js/bootstrap-datepicker.js"></script>
<script src="../../GIZWSIP-FstComponent/js/jquery.js"></script>
<script src="../../GIZWSIP-FstComponent/js/bootstrap.js"></script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Datepicker - Default functionality</title>
<link rel="stylesheet" href="../../GIZWSIP-FstComponent/css/jquery-ui.css">
<script src="../../GIZWSIP-FstComponent/js/jquery-1.11.0.js"></script>
<script src="../../GIZWSIP-FstComponent/js/jquery-ui.js"></script>
<script>
$(function () {
$("#PlanningFrom").datepicker();
$("#PlanningTo").datepicker();
$("#DateOfPlanning").datepicker();
});
</script>
</head>
</html>
答案 0 :(得分:0)
我认为在你的情况下,不同的js文件彼此冲突。
尝试使用$.noConflict()
来避免jquery文件之间发生冲突: -
请点击此链接: