This is a migrated thread and some comments may be shown as answers.
Issue while defining columns for telerik mvc grid
0 Answers 12 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
test
Top achievements
Rank 1
test asked on 05 Jul 2011, 10:45 AM
I m getting the following error when i try to define the columns for the grid:
Unable to cast object of type 'System.Linq.Expressions.ConstantExpression' to type 'System.Linq.Expressions.ParameterExpression'
Can someone tell me how i can bind the columns in this case?
I am trying to add columns for the grid as:

List<Details> posEquity = Model.ListPositions.FindAll(delegate(Details Details) { return accPosDetails.SecurityType; });
                  
                   @if (posEquity != null && posEquity.Count > 0)
                   {
                       <div>
                       @foreach (Details pos in posEquity)
                    {
                        Html.Telerik().Grid(posEquity).Name("grdPersonView")
                        .Columns(columns =>
                         {
                             columns.Bound(p => pos.AccountNumber);
                             columns.Bound(p => pos.CashValue);
                             columns.Bound(p => pos.CashSuperscript);
                         })
                       .Render();
                       }
                      
                       </div>
Tags
Grid
Asked by
test
Top achievements
Rank 1
Share this question
or