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

[Solved] Using Telerik Grid with loosely defined model

2 Answers 41 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jonathan
Top achievements
Rank 1
Jonathan asked on 22 Dec 2010, 03:49 PM
I've encountered a problem using the Telerik Grid: I have a query I need to connect to the grid but it returns an undetermined number of columns that depend on user input (for instance, I show one column per week of data requested).  Because of this, I cannot create a predefined model to give the grid.  I've tried using dynamic types with ExpandoObjects but this fails because creating bound columns requires type-checking.  Does anyone have a suggestions?  Thanks for your help!

2 Answers, 1 is accepted

Sort by
0
Jonathan
Top achievements
Rank 1
answered on 22 Dec 2010, 04:07 PM
I forgot to mention that my current plan is to hack the source and add another constructor to GridBoundColumn to alleviate this problem but I'd prefer not to do this.  Thanks again for your advice.
0
Jonathan
Top achievements
Rank 1
answered on 22 Dec 2010, 04:34 PM
Also, it appears that for MVC3, there's a check in the GridBoundColumn constructor for whether or not the Grid Model is a dynamic object.  Would upgrading to MVC3 resolve my problem entirely?
Tags
General Discussions
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Jonathan
Top achievements
Rank 1
Share this question
or