Pre-processing grid rows
Name Surname Age Birthday Employed
Joe Crosswave 31 1/5/1988 False
Cody Jurut 49 8/11/1970 False
Leena Laurent 19 7/1/2000 False
Diandra Mizner 20 8/20/1999 False
Pete Cassel 22 3/13/1997 False
Post-processing grid rows
N. Surname Age Birthday Employed
J. Crosswave 31 1/5/1988 False
M. Lisel 41 5/6/1978
H. Crux 28 11/19/1990 True
C. Jurut 49 8/11/1970 False
S. Scranton 34 10/10/1985
L. Laurent 19 7/1/2000 False
O. Cosmides 53 4/17/1966 True
D. Mizner 20 8/20/1999 False
P. Cassel 22 3/13/1997 False
N. Tremblay 31 1/5/1988 True
View

@model IEnumerable<Person>

@(Html
    .Grid(Model)
    .Build(columns =>
    {
        columns.Add(model => model.Name).Titled("Name");
        columns.Add(model => model.Surname).Titled("Surname");

        columns.Add(model => model.Age).Titled("Age");
        columns.Add(model => model.Birthday).Titled("Birthday").Formatted("{0:d}");
        columns.Add(model => model.IsWorking).Titled("Employed");
    })
    .UsingProcessor(new NotWorkingPersonFilter())
)

View

@model IEnumerable<Person>

@(Html
    .Grid(Model)
    .Build(columns =>
    {
        columns.Add(model => model.Name).Titled("N. Surname");

        columns.Add(model => model.Age).Titled("Age");
        columns.Add(model => model.Birthday).Titled("Birthday").Formatted("{0:d}");
        columns.Add(model => model.IsWorking).Titled("Employed");
    })
    .UsingProcessor(new ShortNameProcessor())
)


Not working person filter

public class NotWorkingPersonFilter : IGridProcessor<Person>
{
    public GridProcessorType ProcessorType { get; set; }

    public NotWorkingPersonFilter()
    {
        ProcessorType = GridProcessorType.Pre;
        // Executed on all the data, mainly for filtering/sorting in a custom way
    }

    public IQueryable<Person> Process(IQueryable<Person> items)
    {
        return items.Where(item => item.IsWorking == false);
    }
}

Short name processor

public class ShortNameProcessor : IGridProcessor<Person>
{
    public GridProcessorType ProcessorType { get; set; }

    public ShortNameProcessor()
    {
        ProcessorType = GridProcessorType.Post;
        // Executed after data is filtered and sorted, mainly for paging in a custom way
    }

    public IQueryable<Person> Process(IQueryable<Person> items)
    {
        return items.Select(person => new Person
        {
            Id = person.Id,
            Name = person.Name.Substring(0, 1) + ". " + person.Surname,
            Surname = person.Surname,

            Age = person.Age,
            Birthday = person.Birthday,
            IsWorking = person.IsWorking,
            MaritalStatus = person.MaritalStatus,

            Children = person.Children
        });
    }
}