Reputation: 8646
I have ViewBag.ScoringList as a list of elements like:
Scoring_id=1, Code=2,Correlated_To="correlationtext1"
Scoring_id=2, Code=3,Correlated_To="correlationtext2"
I want to bind it in kendo grid.
I have done as follows:
@(Html.Kendo().Grid(ViewBag.ScoringList)
.Name("lvScoring")
.Columns(columns =>
{
// Create a column bound to the ProductID property
columns.Bound(correlatedTo => ViewBag.ScoringList.Correlated_To);
})
)
But its giving me error on columns =>
that:
Can not use lamda expression as an argument to a dynamically dispatched operation...
How can i bind grid???
Upvotes: 1
Views: 171
Reputation: 4364
Try this
@(Html.Kendo().Grid(ViewBag.ScoringList)
.Name("lvScoring")
.Columns(columns =>
{
columns.Bound(Correlated_To).Title("Correlated To");;
})
)
Upvotes: 1