WebGrid MVC 3 loses sorting if column is formatted ( format: @<text>) or throws null exception on sorting
WebGrid MVC 3 . Webgrid throws System.NullReferenceException
: on sorting. This happens if any of the column value is null . If I use following code to check for the nulls
grid.Column( columnName: "IncomingFile.Name", header: "IncomingFile.Name", canSort: true,
format: @<text>
@if (@item.IncomingFile != null)
{@item.IncomingFile.Name}
</text>),
Then the webgrid loses its sorting c开发者_运维知识库an anyone help how to solve this.
精彩评论