Kendo Grid与客户端模板

时间:2015-05-21 09:58:50

标签: javascript html kendo-ui kendo-grid kendo-ui-mvc

这是我的Telerik Grid。我想把它转换成Kendo Grid 我必须将此代码写入Kendo Grid:

 @(Html.telerik().Grid<MDA.AppEntities.Orders.OrderList(Model.OrderList)
   .Name("GridLastOrder")
   .Columns(columns =>{ columns.Template(@<text>
   @if (item.EventTypeID == 2 || item.EventTypeID == 3)
   {
 var nurserole = new string[] { OperationRoles.Nurse.ToString() };
 if (item.EventTypeID == 2 && nurserole.Any(MDA.AppController.GlobalController.CSRRoles.Isinrole))
 {
  <a href="@Url.Action("CreateConsultation", "Operations", new { customerID = item.EventPatientID, type = item.EventTypeID, IsEdit = item.Ord_ID })">
                                    Edit/ Modify Consult
                                </a> <br />
                                <a href="Javascript:void(0)" onclick="javascript:cancelConsult(@item.Ord_ID)" style="color:Red;">
                                    Cancel
                                    Consult
                                </a><br />
                            }
                        }
                 </text>).Title("Action Links");
             })  
               .Sortable() )  }

1 个答案:

答案 0 :(得分:0)

您可以查看Migration guide,其中描述了Telerik和Kendo UI Grid之间的差异。查看代码,它似乎与following demo中的Grid类似。