开发者

How to show values from resources for a boolean BoundField

In a GridView, how to show in a boolean BoundField value from resources for each value (true, false).

For example: If the value is true开发者_如何学Go then show "Value a" (from resources) else then show "Value B".


Better to make it Template field and then do like...

<asp:Label ID="lbl" runat="server" <%# Eval("ColumnName") == true ? 
Resources.GlobalRes.KeyNameA : 
Resources.GlobalRes.KeyNameB  %> ></asp:Label>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜