简体   繁体   中英

Kendo Grid with client template

This is my Telerik Grid. I want to convert it into Kendo Grid.
I have to write this code into 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() )  }

you could check the Migration guide , that describes the differences between the Telerik and Kendo UI Grid. Looking at the code, it seems similar to the Grid in the following demo .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM