This is a migrated thread and some comments may be shown as answers.

[Solved] Master/Detail in seperate grids rather than embedded

2 Answers 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jonathan
Top achievements
Rank 1
Jonathan asked on 23 Aug 2011, 03:02 PM
I have looked at the Master/Detail examples where you have a row and click a '+' to expand a row to show a grid below it.

Is there a way to have 2 grids on a page and when a row is selected in the top grid the bottom grid gets populated?

2 Answers, 1 is accepted

Sort by
0
Todd Anglin
Top achievements
Rank 2
answered on 23 Aug 2011, 08:02 PM
Definitely!

The Grid for MVC exposes a "onRowSelect" event that can be used to take actions as the result of a Grid row selection. By handling this event, you can easily bind a second grid on a page as the result of clicking on a row in the first.

In fact, there is an online demo showcasing this exact scenario. Check-out this master/detail 2-Grid demo and see if it helps:

http://demos.telerik.com/aspnet-mvc/grid/selectionclientside

Hope that helps answer your question.

-Todd
0
Jonathan
Top achievements
Rank 1
answered on 24 Aug 2011, 01:12 PM
That does help thanks however if I want to add a record in the detail grid how can I specify the current id that is being used so i can call the Insert Action method and return a result using GetById method with the current id
Tags
Grid
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Todd Anglin
Top achievements
Rank 2
Jonathan
Top achievements
Rank 1
Share this question
or