I have a web grid and I am not using razor syntex.Rather I am using the .aspx form. the code is below;
<% var grid = new WebGrid(Model,defaultSort:\"Publi
This worked for me:
grid.Column("Date_Of_Birth", "Date Of Birth", format: item => ((item.Date_Of_Birth == null) ? "" : item.Date_Of_Birth.ToString("MM/dd/yyyy")))