Telerik グリッドの実装で「JQuery undefined」という JavaScript エラーが発生します。同じ理由がわかりません。可能なすべての JQuery ファイルを含めましたが、それでも Javascript エラーが発生します。
以下は私が実装したサンプルコードです。
<script src="@Url.Content("~/Scripts/jquery-1.7.1.js")" type="text/javascript"></script>
@(Html.Telerik().Grid(Model.Employee)
.HtmlAttributes(new { style = "width:100%;" })
.Name("Employee")
.DataKeys(keys =>
{
keys.Add(m => Id);
})
.Columns(columns =>
{
columns.Bound(p => p.Name).Title("Name")
.HeaderHtmlAttributes(new { width = "110px", style = "text-align:center;font-weight:bold;height:auto" })
.HtmlAttributes(new { width = "110px", style = "text-align:left;height:auto" });
columns.Bound(p => p.ReportedStatus).ClientTemplate("<#= ReportedStatus(data) #>").Title("Reported")
.HeaderHtmlAttributes(new { width = "130px", style = "text-align:center;font-weight:bold;height:auto" })
.HtmlAttributes(new { width = "130px", style = "text-align:center;height:auto" });
columns.Bound(p => p.status).Title("status").ClientTemplate("<#=status(data) #>")
.HeaderHtmlAttributes(new { width = "130px", style = "text-align:center;font-weight:bold;height:auto" })
.HtmlAttributes(new { width = "130px", style = "text-align:center;height:auto" });
columns.Bound(p => p.Hrs).Title("Hrs")
.HeaderHtmlAttributes(new { width = "150px", style = "text-align:center;font-weight:bold;height:auto" })
.HtmlAttributes(new { width = "150px", style = "text-align:center;height:auto" });
columns.Bound(l => l.Location).ClientTemplate("<#= Location(data) #>").Title("Location")
.HeaderHtmlAttributes(new { width = "200px", style = "text-align:center;font-weight:bold;height:auto" })
.HtmlAttributes(new { width = "200px", style = "text-align:center;height:auto" });
columns.Bound(l => l.Role).ClientTemplate("<#= Role(data) #>").Title("Role")
.HeaderHtmlAttributes(new { width = "150px", style = "text-align:center;font-weight:bold;height:auto" })
.HtmlAttributes(new { width = "150px", style = "text-align:center;height:auto" });
}).Footer(false)
)
<script type="text/javascript" src="@Url.Content("~/Scripts/telerik.common.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/telerik.textbox.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/telerik.grid.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/telerik.draganddrop.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/telerik.window.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/telerik.grid.editing.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/telerik.upload.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/telerik.menu.js")"></script>
@(Html.Telerik().ScriptRegistrar()
.jQuery(false)
.DefaultGroup(group => group
.Add("telerik.examples.min.js")
.Add("telerik.grid.js")
.Compress(false)
.Combined(true))
.OnDocumentReady(
@<text> prettyPrint();
</text>)
)
この JQuery エラーのためにここで何をしているのか教えてください。
前もって感謝します、 Maanoj