0
votes

First off, I'm new to DevExpress. I have done a fair amount of search but have not yet found the solution for what I am trying to do which is: Open a details page from a ASPxGridView based off of the row key.

I've seen child detail examples but since I have multiple related tables each of which may contain too many rows to be displayed nicely nested in the grid, I'd like to create a separate page for this view.

I have the master grid done. What I haven't figured out yet is

  1. How to create a link in a column, based off of the row key.
  2. The best way to create the related detail page.
1

1 Answers

1
votes

You can Have a Column in the GridView (with a Hyperlink in it), Which upon being clicked calls a JavaScript function. The JS function does the appropriate action to pull up the Details View, which colud be a Page Redirect or an Ajax Popup Details view per your needs.

 <dxwgv:GridViewDataTextColumn Caption="Details">
    <EditFormSettings Visible="False" />
    <DataItemTemplate>
        <a href="showDetails('<%# Container.KeyValue.ToString() %>')"> Show Details </a>
    </DataItemTemplate>
</dxwgv:GridViewDataTextColumn>

JS code...

<script type="text/javascript">
    function showDetails(rowId){
        //Your Logic of how to display Details for the Row id
    }    
</script>