在我的网格中,当剑道网格触发 ajax 请求时,我想调用 javascript 函数。当 ajax 请求结束时,我需要触发另一个 javascript 函数。代码:
@(Html.Kendo()
.Grid<Aditro.Foundation.Dashboard.Web.Models.Link>()
.Name("LinkGrid")
.Columns(columns =>
{
columns.Bound(c => c.Text).Width(100);
columns.Bound(c => c.Url).Width(250);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(100);
})
.DataSource(source =>
{
source.Ajax().Read(read => read.Action("GetLinks", "Settings").Data("Grid_OnComplete"))
.Create(read => read.Action("LinkAddEdit", "Settings"))
.Events(e => e.RequestStart("callloading"))
.Update(read => read.Action("LinkAddEdit", "Settings"))
.Destroy(read => read.Action("LinkDelete", "Settings"))
.Model(model => { model.Id("LinkId"); model.Field(x => x.Genus_List_Action).Editable(true); model.Field(x => x.Genus_List_Select).Editable(false); });
})
.ToolBar(toolbar => toolbar.Create())
.Pageable(pageable =>
{
pageable.Enabled(true);
pageable.PageSizes(new[] { 5, 10, 15, 20, 25 });
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Navigatable()
.Selectable(action => action.Mode(GridSelectionMode.Single))
//.Filterable()
.Sortable(sort => sort.SortMode(GridSortMode.MultipleColumn))
.Resizable(resizable => resizable.Columns(true))
)
谢谢