首页 > 其他 > 详细

Use Different Editors Based on the Column Values of the Grid

时间:2019-11-11 00:49:26      阅读:124      评论:0      收藏:0      [点我收藏+]


        <script id="altRowTemplate" type="text/x-kendo-tmpl">
            <tr class="k-alt" data-uid="#: uid #">
                <td class="photo">
                   <img src="../content/web/Employees/#:data.EmployeeID#.jpg" alt="#: data.EmployeeID #" />
                </td>
                <td class="details">
                   <span class="name">#: FirstName# #: LastName# </span>
                   <span class="title">Title: #: Title #</span>
                </td>
                <td class="country">
                    #: Country #
                </td>
                <td class="employeeID">
                   #: EmployeeID #
                </td>
           </tr>
        </script>
        <script>
           $(document).ready(function() {
                $("#grid").kendoGrid({
                    dataSource: {
                      type: "odata",
                      transport: {
                          read: {
                              url: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Employees",
                          }
                      }
                    },
                    rowTemplate: kendo.template($("#rowTemplate").html()),
                    altRowTemplate: kendo.template($("#altRowTemplate").html()),
                    height: 550
                });
           });
        </script>

Use Different Editors Based on the Column Values of the Grid

原文:https://www.cnblogs.com/whsongblog/p/11832520.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!