Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 04, 2012 11:00 PM by wavemaster
Jul 04, 2012 09:17 PM|LINK
My table has a column with datatype bit, i.e. I have zeros or ones in the table.
When I display information from table I want it to show Yes or No.
Is there a way to do this elegantly?
Jul 04, 2012 10:03 PM|LINK
As an example you could format the WebGrid column in this way:
grid.Column("columnName", format: @<text>@(item.bitField ? "Yes" : "No")</text>))
Jul 04, 2012 11:00 PM|LINK