This is a migrated thread and some comments may be shown as answers.

MVC Grid - Null Values

0 Answers 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Travis
Top achievements
Rank 1
Travis asked on 28 Oct 2011, 04:12 PM
Is it possible to supply a display value for null values in the MVC grid while still maintaining the correct editor/filter, etc.
I know the below method does not exist but I was wondering if there was a way to do something similar. I don't want to convert the value to a string in my controller because I want the filter for this column to still be a date picker. If the date is null, though, I want to see the text "N/A" instead of being blank.

I was thinking something along the lines of:

.Columns(columns =>
{
    columns.Bound(c => c.DateColumn).NullValue("N/A");
});
Tags
Grid
Asked by
Travis
Top achievements
Rank 1
Share this question
or