国产精品久久久久久2021,日韩精品无码av中文无码版,亚洲精品久久久午夜麻豆,无码成人精品日本动漫纯h

010-68421378
當(dāng)前您所在的位置:首頁>新聞中心>新品發(fā)布

Kendo UI for jQuery數(shù)據(jù)管理使用教程:ListView Items

發(fā)布時(shí)間:2020/11/05 瀏覽量:3847
Kendo UI for jQuery是創(chuàng)建現(xiàn)代Web應(yīng)用程序的完整UI庫

Kendo UI目前最新提供KendoUI for jQuery、KendoUI for Angular、KendoUI Support for React和KendoUI Support for Vue四個(gè)控件。Kendo UI for jQuery是創(chuàng)建現(xiàn)代Web應(yīng)用程序的完整UI庫。

 

 

Items

您的項(xiàng)目可能需要在可視化上區(qū)分ListView中的每個(gè)替代項(xiàng)。

例如,您可能需要在稍暗的背景(帶狀行)中渲染第二個(gè)項(xiàng)目。要在ListView中呈現(xiàn)交替項(xiàng),請(qǐng)通過定義altTemplate屬性來設(shè)置模板。

<div id=”listView”></div>
<div class=”k-page-wrap”>
<div id=”pager”></div>
</div>

<script type=”text/x-kendo-tmpl” id=”template”>
<div class=”product”>
<img src=”https://demos.telerik.com/kendo-ui/content/web/foods/#= ProductID#.jpg” alt=”#: ProductName # image” />
<h3>#:ProductName#</h3>
<p>#:kendo.toString(UnitPrice, “c”)#</p>
</div>
</script>

<script type=”text/x-kendo-tmpl” id=”altTemplate”>
<div class=”product alt”>
<img src=”https://demos.telerik.com/kendo-ui/content/web/foods/#= ProductID#.jpg” alt=”#: ProductName # image” />
<h3>#:ProductName#</h3>
<p>#:kendo.toString(UnitPrice, “c”)#</p>
</div>
</script>

 

下面的示例演示了建議方法的完整實(shí)現(xiàn)。

<div id=”listView” style=”max-height:400px;overflow:auto;”></div>
<div class=”k-pager-wrap”>
<div id=”pager”></div>
</div>

<script type=”text/x-kendo-tmpl” id=”template”>
<div class=”product”>
<img src=”https://demos.telerik.com/kendo-ui/content/web/foods/#= ProductID#.jpg” alt=”#: ProductName # image” />
<h3>#:ProductName#</h3>
<p>#:kendo.toString(UnitPrice, “c”)#</p>
</div>
</script>

<script type=”text/x-kendo-tmpl” id=”altTemplate”>
<div class=”product alt”>
<img src=”https://demos.telerik.com/kendo-ui/content/web/foods/#= ProductID#.jpg” alt=”#: ProductName # image” />
<h3>#:ProductName#</h3>
<p>#:kendo.toString(UnitPrice, “c”)#</p>
</div>
</script>

<script>
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: “https://demos.telerik.com/kendo-ui/service/Products”,
dataType: “jsonp”
}
},
pageSize: 3
});

$(“#pager”).kendoPager({
dataSource: dataSource
});

$(“#listView”).kendoListView({
dataSource: dataSource,
template: kendo.template($(“#template”).html()),
altTemplate: kendo.template($(“#altTemplate”).html()),
});
</script>

<style>
.alt { background-color: #EEE; }
</style>

下一篇:Kendo UI for jQuery數(shù)據(jù)管理使用教程:ListView Selection
上一篇:魯班萬通(Bentley版):支持將imodel格式文件輸出為pds文件

                               

 京ICP備09015132號(hào)-996 | 違法和不良信息舉報(bào)電話:4006561155

                                   © Copyright 2000-2026 北京哲想軟件有限公司版權(quán)所有 | 地址:北京市海淀區(qū)西三環(huán)北路50號(hào)豪柏大廈C2座11層1105室

                         北京哲想軟件集團(tuán)旗下網(wǎng)站:哲想軟件 | 哲想動(dòng)畫

                            華滋生物