Jquery 在列模板剑道网格中使用JavaScript函数
我在这里有一个函数,我想在剑道列中调用它。函数是检查类是否被单击。但当我在剑道列中添加该类时,什么都没有发生,我在这里做什么?你能帮我把那门课叫到剑道专栏吗 谢谢Jquery 在列模板剑道网格中使用JavaScript函数,jquery,asp.net-mvc,kendo-grid,Jquery,Asp.net Mvc,Kendo Grid,我在这里有一个函数,我想在剑道列中调用它。函数是检查类是否被单击。但当我在剑道列中添加该类时,什么都没有发生,我在这里做什么?你能帮我把那门课叫到剑道专栏吗 谢谢 <script> $(function() { $(".createInvoice").on('click', function(e) { e.preventDefault(); debugger; var self = $(this);
<script>
$(function() {
$(".createInvoice").on('click', function(e) {
e.preventDefault();
debugger;
var self = $(this);
var createInvoiceW = $("#createInvoiceWindow");
var kwindow = createInvoiceW.data("kendoWindow");
kwindow.refresh({
url: "@Url.Action("CreateInvoicePopup", "Finances")/" + self.data('job-id')
});
kwindow.center();
kwindow.open();
});
});
</script>
<div id="createInvoiceWindow" class="kWindow"
data-title="false"
data-width="600"
@* data-height="700"*@
data-ajax="true"
data-visible="false"
data-url="@Url.Action("CreateInvoicePopup", "Finances")"></div>
$(函数(){
$(“.createInvoice”)。在('click',函数(e){
e、 预防默认值();
调试器;
var self=$(这是);
var createInvoiceW=$(“#createInvoiceWindow”);
var kwindow=createInvoiceW.data(“kendoWindow”);
科文多({
url:“@url.Action”(“CreateInvoicePopup”,“Financials”)/“+self.data('job-id'))
});
kwindow.center();
kwindow.open();
});
});
剑道格网
<div id="jobs-grid"></div>@(Html.Kendo().Grid<Modus.Presentation.Models.Jobs.JobModel>()
.Name("#jobs-grid")
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("List", "Jobs"))
)
.Columns(columns =>
{
columns.Bound(product => product.JobNumber).ClientTemplate("<a href='" +
"/#= Id #'" +
">Show Product Details</a>").HtmlAttributes(new { @class = "createInvoice" });
columns.Bound(product => product.Customer.Name).ClientTemplate("<a class='createInvoice'>hgg</a>");
columns.Bound(product => product.Customer.Name).HtmlAttributes(new { @class = "createInvoice" });
columns.Bound(p => p.JobNumber).Template(@<text>
@Html.ActionLink("", "", new { id = @item.Id , @class= "createInvoice" })>
</text>);
})
.Pageable()
)
@(Html.Kendo().Grid())
.Name(“作业网格”)
.DataSource(DataSource=>DataSource
.Ajax()
.Read(Read=>Read.Action(“列表”、“作业”))
)
.列(列=>
{
columns.Bound(product=>product.JobNumber).ClientTemplate(“”.HtmlAttributes(新的{@class=“createInvoice”});
columns.Bound(product=>product.Customer.Name).ClientTemplate(“hgg”);
columns.Bound(product=>product.Customer.Name).HtmlAttributes(新的{@class=“createInvoice”});
columns.Bound(p=>p.JobNumber).Template(@
@Html.ActionLink(“,”,new{id=@item.id,@class=“createInvoice”})>
);
})
.Pageable()
)