Telerik UI for ASP。网络核心?下载30天免费试用

模板列

模板列使您能够根据特定的首选项自定义数据的显示方式。

下面的示例演示如何使用来自底层数据源的图像和属性绑定为Grid列指定您自己的自定义布局。这些模板是使用JavaScript函数定义的。

@(Html.Kendo(). grid () . name ("grid") . columns (columns => {columns. grid . column . column))绑定(c => c. contactname).Width(140).ClientTemplate("#=template(data)#");列。绑定(c => c. contacttitle).Width(190);列。绑定(c => c. companyname);列。Bound(c => c. country).Width(110);}) .HtmlAttributes(new {style = "height: 380px;"}) . scrollable () . groupable () . sortable () . pageable (pageable => pageable . refresh (true) . pagesize (true) . buttoncount (5)) . dataSource (dataSource => dataSource . ajax () . read (read => read。Action("Customers_Read", "Grid"))))  
 < DataSourceTagHelperType ="DataSourceTagHelperType. "自定义" Custom -type="odata" page-size="20">      < sorable enabled="true" />            
在本文中
Baidu
map