设置DisplayTemplate到列的WebGrid [英] Set a DisplayTemplate to a WebGrid Column

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

问题描述

我有这个样本

@Html.DisplayFor(modelItem => item.Expires, "DateTimeToDate" )

DateTimeToDate显示模板:

DateTimeToDate Display Template:

@model DateTime?
@Html.Label(Model.HasValue ? Model.Value.ToShortDateString(): string.Empty)

... grid.Column("Expires", @Resources.Localization.Expires, canSort: true) ...

那么,我怎么可以在列的WebGrid使用DisplayTemplate?

So, how i can use DisplayTemplate in webgrid column ?

regrads。

推荐答案

我发现<一个href=\"http://www.nelite.com/community/b/fblondel/archive/2012/05/29/asp-net-mvc-3-set-a-displaytemplate-to-a-webgrid-column.aspx\"相对=nofollow>这篇文章精确匹配你需要我猜...

I found this article matching exactly your need I guess...

太糟糕了,当你问的问题它没有写!

Too bad it was not written yet when you asked the question!

这篇关于设置DisplayTemplate到列的WebGrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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