Strongly-Typed Grid? a Discussion

Feb 23, 2011 at 3:20 PM

Currently, when defining a new grid, the columns are mapped manually where type and and name must be given, e.g.

<%= Html.Grid(new GridControl().AddColumn(new GridColumnModel("Age", ColCellType.INT) ... %>

A nice alternative could have been:

<%= Html.Grid(new GridControl<Person>().AddColumn(new GridColumnModel(x=>x.Age)) ... %>

But making the grid generic will prevent the ability to bind the grid to a dynamic object, or an anonymous type.


So the question is, do you prefer a generic strongly-typed grid, or a more loosely coupled one?