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

[Solved] Un-nested master/detail

1 Answer 111 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.
Alden
Top achievements
Rank 1
Alden asked on 08 Jan 2012, 04:13 AM
I see the example of nested master/detail, and the example of selection that shows customers in a master grid and orders in a detail grid.  However, I'm interested in master/detail selection, but the detail is not a grid.  Rather, it is a partial view with several charts, grids and content taken from its own view model (it's basically a status report).  Do you have an example with client-side selection on the grid that will populate my partial view?

Thanks!

AldenG

1 Answer, 1 is accepted

Sort by
0
Alden
Top achievements
Rank 1
answered on 09 Jan 2012, 01:41 AM
Okay, the closest I have come to this is to make a template column in the grid that does an ajax callback to the server to populate the report div (which will include 2 charts and a grid).  I haven't tested this, yet, but I have the following in the master grid:
c.Template(@<text>
    @Ajax.ActionLink("details", "ViewDetails", new { id = item.Id}, new AjaxOptions {
        UpdateTargetId="ProjectDetails",// the div for the report
        Url=Url.Action("ViewDetails"),// for graceful degradation
        LoadingElementId="ProjectDetailsLoading",// the div for the loading... graphic
        LoadingElementDuration=2000 })
    </text>);
However, I want to do the equivalent of this from a client-side select on a row.  Just click the row and see the detail.  No need for an extra button in the row.

The best example I see uses JSON, which would be great for simple HTML, but my div contains charts and grids that would be very hard to parse on the client.  Can I trigger the equivalent of the above ActionLink from the onSelected client side event?
Tags
Grid
Asked by
Alden
Top achievements
Rank 1
Answers by
Alden
Top achievements
Rank 1
Share this question
or