如何在mvc中绑定数据 [英] how data bind in mvc
问题描述
iam在mvc中使用网格
行名称状态
1 ali false
2 saeed true
3 jim treu
我想要显示结果
行名称状态
1个阿里不活跃
2个赛义德活跃
3吉姆活跃
< pre lang =HTML> grid.Column(
FNewsstatus,
(grid.SortColumn ==FNewsstatus?(grid.SortDirection == SortDirection.Ascending?status▼:status ▲):状态),
格式:
@ < text >
< span class = display-mode > < label id = lblBirthDate > @ {if(@ item.status)} < / label > < / span >
< / text > ,
style:IDWith,canSort:false),
你应该多使用谷歌......
一个简单的搜索就可以了给你带来成千上万的答案...
现在,你可以从这里开始:
http://msdn.microsoft.com/en-us/magazine/hh288075.aspx [ ^ ]
看到这篇文章用简单的例子解释web gride帮助你。
ASP.NET MVC4中的WebGrid [ ^ ]
iam use web grid in mvc
row name status
1 ali false
2 saeed true
3 jim treu
iam want show result
row name status
1 ali inactive
2 saeed active
3 jim active
grid.Column(
"FNewsstatus",
(grid.SortColumn == "FNewsstatus" ? (grid.SortDirection == SortDirection.Ascending ? " status▼" : "status▲") : "status"),
format:
@<text>
<span class="display-mode"><label id="lblBirthDate">@{ if (@item.status)} </label></span>
</text>,
style: "IDWith", canSort: false),
You should use Google more...
A simple search can bring you hundreds of thousands of answers...
For now, you may start here:
http://msdn.microsoft.com/en-us/magazine/hh288075.aspx[^]
See this article it explain web gride with a simple example may be it help you.
WebGrid in ASP.NET MVC4[^]
这篇关于如何在mvc中绑定数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!