Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc 剑道对话+;网格,如何将网格名称传递给包含多个网格的页面上的函数_Asp.net Mvc_Asp.net Core_Telerik_Kendo Grid_Kendo Asp.net Mvc - Fatal编程技术网

Asp.net mvc 剑道对话+;网格,如何将网格名称传递给包含多个网格的页面上的函数

Asp.net mvc 剑道对话+;网格,如何将网格名称传递给包含多个网格的页面上的函数,asp.net-mvc,asp.net-core,telerik,kendo-grid,kendo-asp.net-mvc,Asp.net Mvc,Asp.net Core,Telerik,Kendo Grid,Kendo Asp.net Mvc,我在一个页面上有许多剑道网格,带有自定义剑道对话框删除功能,我想获得删除自定义功能的确切网格名称: .Name("RevenueGrid1") .Columns(columns => { columns.ForeignKey(p => p.FundAgencyId, (System.Collections.IEnumerable)ViewBag.

我在一个页面上有许多剑道网格,带有自定义剑道对话框删除功能,我想获得删除自定义功能的确切网格名称:

.Name("RevenueGrid1")
                      .Columns(columns =>
                      {
                          columns.ForeignKey(p => p.FundAgencyId, (System.Collections.IEnumerable)ViewBag.FundAgencyList, "Id", "FundAgencyDisplayText").Title("Fund/BC").Width(300).Filterable(ft => ft.Cell(c => { c.Operator("startswith"); c.InputWidth(300); c.ShowOperators(false); }));
                          columns.Bound(p => p.FundSource).Title("Source/Desc").Width(300).HtmlAttributes(new { title = "#= FundSource #" });
                          columns.ForeignKey(p => p.RevenueObject, (System.Collections.IEnumerable)ViewBag.BudgetObjectList, "Id", "BudgetObjectDisplayText").EditorTemplateName("GridRevenueObject").Width(300).Title("Revenue Source").Filterable(ft => ft.Cell(c => { c.Operator("startswith"); c.InputWidth(300); c.ShowOperators(false); }));
                          columns.ForeignKey(p => p.RevenueSubObject, (System.Collections.IEnumerable)ViewBag.SubObjectList, "Id", "SubObjectDisplayText").Width(300).Title("Dept. Rev Source").Filterable(ft => ft.Cell(c => { c.Operator("startswith"); c.InputWidth(300); c.ShowOperators(false); }));
                          columns.Bound(p => p.RevenueAmount).Title("Amount")
                                      .Width(150).ClientTemplate("#if(RevenueAmount != null){##= kendo.format('{0:N0}', (RevenueAmount)) ##} else { } #").HtmlAttributes(new { style = "text-align: right;" }).ClientFooterTemplate("Total: <span class='customFooterTotal'>#=kendo.toString((sum == null) ? 0 : sum, 'n0') #</span>").FooterHtmlAttributes(new { style = "text-align: right;" });
                          columns.Command(command => command.Custom("Delete").Click("showDeleteConfirmation").HtmlAttributes(new { style = "width:95%" })).Width(87).Visible(Model.CanEditForm);
                      })
 function confirmDelete(e) {
 //how to get grid name?
}
并将其传递给删除功能:

.Name("RevenueGrid1")
                      .Columns(columns =>
                      {
                          columns.ForeignKey(p => p.FundAgencyId, (System.Collections.IEnumerable)ViewBag.FundAgencyList, "Id", "FundAgencyDisplayText").Title("Fund/BC").Width(300).Filterable(ft => ft.Cell(c => { c.Operator("startswith"); c.InputWidth(300); c.ShowOperators(false); }));
                          columns.Bound(p => p.FundSource).Title("Source/Desc").Width(300).HtmlAttributes(new { title = "#= FundSource #" });
                          columns.ForeignKey(p => p.RevenueObject, (System.Collections.IEnumerable)ViewBag.BudgetObjectList, "Id", "BudgetObjectDisplayText").EditorTemplateName("GridRevenueObject").Width(300).Title("Revenue Source").Filterable(ft => ft.Cell(c => { c.Operator("startswith"); c.InputWidth(300); c.ShowOperators(false); }));
                          columns.ForeignKey(p => p.RevenueSubObject, (System.Collections.IEnumerable)ViewBag.SubObjectList, "Id", "SubObjectDisplayText").Width(300).Title("Dept. Rev Source").Filterable(ft => ft.Cell(c => { c.Operator("startswith"); c.InputWidth(300); c.ShowOperators(false); }));
                          columns.Bound(p => p.RevenueAmount).Title("Amount")
                                      .Width(150).ClientTemplate("#if(RevenueAmount != null){##= kendo.format('{0:N0}', (RevenueAmount)) ##} else { } #").HtmlAttributes(new { style = "text-align: right;" }).ClientFooterTemplate("Total: <span class='customFooterTotal'>#=kendo.toString((sum == null) ? 0 : sum, 'n0') #</span>").FooterHtmlAttributes(new { style = "text-align: right;" });
                          columns.Command(command => command.Custom("Delete").Click("showDeleteConfirmation").HtmlAttributes(new { style = "width:95%" })).Width(87).Visible(Model.CanEditForm);
                      })
 function confirmDelete(e) {
 //how to get grid name?
}

传递一个参数。单击“showDeleteConfirmation('RevenueGrid1')”@SteveGreene Works!非常感谢。