Reputation: 71198
is there a grid for asp.net mvc that acts just like the asp.net webforms datagrid
the behavior that I need is to pass to the grid a DataTable without specifying the amount of columns
Upvotes: 1
Views: 490
Reputation: 3063
Have a look at MvcContrib. They provide a Grid HTML helper, which is very powerful.
I have extended that Grid in my free library, etcetera.Mvc, added AJAX paging, sorting and some more nice options.
Upvotes: 3
Reputation: 18586
In my opinion you should not be using any of the server controls in MVC.
You will need to use a table and iterate through thr required objects, MVC allows much more control over the HTML which meens that you have to do a little more work.
I think you best look at the NerdDinner example.
http://nerddinner.codeplex.com/
And here is an example,
<table>
<% foreach (var category in Model) { %>
<tr>
<td><%= Html.Encode(category.data) %></td>
<tr>
<% } %>
</table>
Upvotes: 1