kendo grid,显示与客户端模板的链接

时间:2015-05-20 11:28:25

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

// this is my kendo grid , in client template how to write DateTime nowDate = DateTime.Now; this things ...



//OrderList  is my model class  



@(Html.Kendo().Grid<MDA.AppEntities.Orders.OrderList(Model.OrderList)
//define the name of grid
                .Name("GridLastOrder")
    // adding column in kendo grid
                .Columns(columns =>
                {
            columns.Bound(c => c.EventConsultStatusID).ClientTemplate(#
            if (CustomerSource == "+3+" || CustomerSource == "+5+")
                                {#
                                    DateTime nowDate = DateTime.Now;
                                    TimeSpan spn = nowDate.Subtract(EventLastUpdated);
                                    if (spn.Days > 2)
                                    {#
                                        <a  href="+ Url.Action("LPU_CustomerPickedUp", "Operations", new { Ord_ID = "#=Ord_ID#" })"> Patient Picked-Up</a><br />
                                    #}
                               # }
         })
         .Resizable(resizing => resizing.Columns(true))
                                .Pageable(Page => Page.Refresh(true).PageSizes(true).PreviousNext(true))
                                .Filterable()
                                .Sortable()

                                .Scrollable()
                                .Groupable()
                                .Reorderable(reorder => reorder.Columns(true))
                                .DataSource(dataSource => dataSource.Ajax()
                                .ServerOperation(false)
                                        )



            )

1 个答案:

答案 0 :(得分:0)

在客户端模板中,您只能编写JS代码,不支持C#代码

相关问题