I wish to create a master/detail page. I see it working one of two ways:
- Clicking a row in a grid calls the same page again with the addition of a details panel.
- Clicking a row does javascript/JSON call to a controller action that returns details and populates a panel.
I would like the selected row to be highlighted. The selected row could be several pages into a paged grid.
Sounds easy. Unfortunately I’m new to asp.net MVC, and I’m not an experienced programmer. However, I can follow and adapt examples. I would appreciate examples of both the above methods to help me learn MVC.
Thanks in advance.
To answer my own question:
I ended up using PartialViews and jQuery.
Clicking on a select link against a row causes a new row to be added below the selected one (using jQuery). Into this row I use jQuery to GET /PurchaseOrder/Detail (a PartialView).
Here is my Javascript:
Hopefully this may helps others trying to achieve a master/details page.