views:

180

answers:

1

I have a table and would like to give an option of whether you want to expand or collapse. If possible, I would also like to show the first 5 recods in the table. I can make two separate tables and toggle, yes, but is there a more efficient way?

+1  A: 

You can do this with JQuery easily by hiding/showing rows of the table. See this post to add a row with jQuery and this one for expanding and collapsing table rows.

Gergely Orosz
You would of course have to generate the jQuery code on the server but this should not be a problem with ASP.NET MVC
Gergely Orosz