0

当我单击 KendoUI 中的按钮时,单击功能不起作用,EditfunctionDeletefunction.

<%: Html.Kendo().Grid(gridobj)
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.TMovie_id).Groupable(false).Title("ID");
        columns.Bound(p => p.Name).Title("Name");
        columns.Bound(p => p.Genre).Title("Genre");
        columns.Command(command => command.Custom("Edit").Click("Editfunction"));
        columns.Command(command => command.Custom("Delete").Click("Deletefunction"));



    })
    .Groupable()
    .Pageable()
    .Sortable()
    .Scrollable()
    .Filterable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("", ""))

    )
%>

<script type="text/javascript">
    function Editfunction(e) {
        e.alert("Inside e Hi");         
        alert("hi");
    }

    function Deletefunction(e) {
        e.alert("Inside e Hi");
        alert("hi");
    }
</script>
4

1 回答 1

0
    columns.Command(commands =>
    {
        commands.Custom("Edit").Click("Editfunction");
        command.Custom("Delete").Click("Deletefunction");
    })

或者

    columns.Command(commands =>
    {
        commands.Destroy().Text("delete");
        commands.Edit().Text("edite");
    })
于 2013-02-04T13:07:48.453 回答