在MVC 4 Telerik Grid的模板列中发送多个参数

时间:2013-07-01 12:37:21

标签: asp.net-mvc-4 razor telerik

下面代码只向控制器发送一个参数(id = o.nopCategoryID),如何发送另一个参数呢?

查看

            @(Html.Telerik().Grid(Model.Mappings)        
                .Name("Grid")
                .Scrollable(c => c.Height("200px"))
                .Columns(columns =>
                {
                    columns.Bound(o => o.ClockCategoryid).Hidden(true);
                    columns.Bound(o => o.nopCategoryID).Hidden(true);
                    columns.Bound(o => o.nopCategory).Width(100).Title("Category");                               

                    columns.Bound(e => e.ClockCategory).Width(200).Title("Mapped To").Template(t => t.ClockCategory.Replace(",", "<br />"));

                    columns.Bound(o => o.nopCategoryID)
                                        .Width(50)
                                        .Centered()
                                        .Template(o => Html.ActionLink("Edit", "EditProduct", new { id = o.nopCategoryID, category = o.nopCategory }))
                                        .Title("Edit");
                    columns.Bound(o => o.nopCategoryID)
                                        .Width(50)
                                        .Centered()
                                        .Template(o => Html.ActionLink("Delete", "DeleteMapping", new { id = o.ClockCategoryid }))
                                        .Title("Delete");        
                })

                )

控制器:

    public ActionResult EditProduct(int id,string category)
    {            
        return Configure(id, 0);
    }

0 个答案:

没有答案