使用kendo ui web网格,如何让我的网格中的单元格成为我控制器中ActionResult的链接?

时间:2014-10-27 19:00:12

标签: asp.net-mvc kendo-ui kendo-grid

在下面的示例中,我希望能够单击网格中的ProductName,以便它将我带到我的控制器中的actionresult。有什么想法吗?

<script>
                    $(document).ready(function() {
                        var grid = $("#grid").kendoGrid({
                            dataSource: {
                                      transport: {
                                          read: { url: '@Url.Action("GetCars", "Home")' }
                                pageSize: 20,
                                serverPaging: true,
                                serverSorting: true,
                                serverFiltering: true
                            },
                            toolbar: [ { name: "create", text: "Add a new car" }],
                            height: 550,
                            sortable: true,
                            pageable: true,
                            columns: [
                                { field: "ProductID", title: "Product ID", width: 100 },
                                { field: "ProductName", title: "Product Name" },
                                { field: "UnitPrice", title: "Unit Price", width: 150 },
                                { field: "QuantityPerUnit", title: "Quantity Per Unit" }
                            ]
                        });
    </script>

0 个答案:

没有答案