使用MVC3自定义显示WebGrid中的动态数据
本文关键字:动态 数据 WebGrid MVC3 自定义 显示 使用 | 更新日期: 2023-09-27 18:17:09
我在MVC 3.0中有一个WebHelpers WebGrid,如果它的值被设置为一定的量,我想自定义显示某个字段。
grid1.Column(columnName : "Process_ID",format:@<text>@if (item.Process_ID == 26){<text><SPAN STYLE="background-color: yellow"> HELLO </SPAN></text>} </text> ),
grid1.Column(columnName : "Process_ID",format:(item.Process_ID == 26)?"<text>Hi</text>":"<text>Bye</text>"}),