Kendo RowTemplate问题.. [英] Kendo RowTemplate problem..

查看:94
本文介绍了Kendo RowTemplate问题..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在kendo文档页面中,我在RowTemplate部分看到了以下代码..

链接



In kendo documentation page I saw the below code in RowTemplate section..
Link

@model IEnumerable<Product>
@(Html.Kendo().Grid(Model)
    .Name("grid")
    .RowTemplate(@<text>
        <div>Product Name: @product.ProductName</div>
        <div>Units In Stock: @product.UnitsInStock</div>
    </text>)
)





任何人请告诉我@product是什么..以及它的定义。



Anyone please tell me what is that @product ..And where it is defined.

推荐答案

由于我们通过网格传递模型,因此使用行模板的Kendo Grid非常智能,可以获得值为

model => model.ProductName使用@ product.ProductName,我们也可以使用任何名称@ item.ProductName ...
Since we pass the Model through the Grid, the Kendo Grid using row template is smart enough to get the values as
model => model.ProductName using @product.ProductName, we could use any name @item.ProductName too...


这篇关于Kendo RowTemplate问题..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆