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

[Solved] Dynamic grid binding with auto generate columns

2 Answers 124 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.
James
Top achievements
Rank 1
James asked on 02 Nov 2011, 08:51 PM
Is something like this too much to ask?  I have a need to use the Grid control, pass it an IEnumerable<dynamic> as the model for the grid, but have it auto-generate the columns.  I did find an example on here using IEnumerable<dynamic>, however, the columns were defined in the grid syntax.

Basically, I would ultimately like to have a view (or partial view) with a Grid control on it that will take anything that implements IEnumerable and have it create a grid.  Now, I don't foresee me needing anything other than the default paging, sorting and grouping functionality, so I'm not entirely concerned about those features.

So, is this possible?  Or do I need to find another workaround/solution?  Thanks.

2 Answers, 1 is accepted

Sort by
0
James
Top achievements
Rank 1
answered on 03 Nov 2011, 05:42 PM
Disregard, I have found a workaround.
0
Darren
Top achievements
Rank 1
answered on 24 Nov 2011, 02:13 AM
James,

What did you find as a workaround?  I have a similar requirement.

Thanks,

-Darren
Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
James
Top achievements
Rank 1
Darren
Top achievements
Rank 1
Share this question
or