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 records in the table. I can make two separate tables and toggle, yes, but is there a more efficient way?
Asked
Active
Viewed 3,829 times
1 Answers
2
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.
The second link is no longer at this website. After doing a little searching on it, I found no new link. It appears to be deleted. There was nothing on the web page in the tutorials for jquery either. Apparent last post on this site is from 2017. Doesn't appear this is a good source anymore.

B'ajj
- 15
- 2
- 5

Gergely Orosz
- 6,475
- 4
- 47
- 59
-
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 Oct 20 '09 at 15:06