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

[Solved] column will not bind

0 Answers 79 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.
william
Top achievements
Rank 1
william asked on 15 Dec 2011, 11:27 AM
Hi All,

I have the following code:
columns.Bound(r => r.Description).Title("Description").Encoded(false);
                    columns.Bound(r => r.Covers.Sum(m => m.SumInsured)).Title("Sum Insured");
                    columns.Bound(r => r.Covers.Sum(m => m.Excess)).Title("Excess");
                    columns.Bound(r => r.Covers.Sum(m => m.IncreasedXSDiscount)).Title("Increased XS Discount");
                    columns.Bound(r => r.Covers.Sum(m => m.Rate)).Title("Rate");
                    columns.Bound(r => r.TechnicalPrice).Title("Technical Price");
When I run the code, it errors on my second column.Bound where I'm trying to display a Sum amount.
The error is : Bound Columns require a field or property access expression.

Covers is an IEnumerable of a class declared on my viewModel.
Tags
Grid
Asked by
william
Top achievements
Rank 1
Share this question
or