This is a migrated thread and some comments may be shown as answers.
dynamic types with MVC grid
1 Answer 51 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.
veera
Top achievements
Rank 1
veera asked on 08 Feb 2011, 07:20 PM
Hi ,

It's posible to use dynamic types with MVC grid?
my controller class generates anonymous type collections. I would like to use anonymous types instead of ViewModel pattern.

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<% Html.Telerik().Grid<dynamic>()
.Name("Ambientes")
.DataBinding(dataBinding => dataBinding.Ajax().Select("_AjaxBinding", "Sort"))
.Columns(column => { column.Bound("yyy").Title("uuu");
               column.Bound("iii").Title("Ambiente"); })

1 Answer, 1 is accepted

Sort by
0
Kyle Nunery
Top achievements
Rank 1
answered on 05 Oct 2011, 08:05 PM
Yes.  The model being passed in should be IEnumerable<dynamic>.
Tags
Grid
Asked by
veera
Top achievements
Rank 1
Answers by
Kyle Nunery
Top achievements
Rank 1
Share this question
or