go to the Host-Module Definitions screen and define a Control for your details ascx control. Then when the user clicks on a select link, use the EditURL() function to display the details view. In the details view use the NavigateURL() function to go back to the grid view.
Here's an example:
Let's say you have 2 controls defined for your module, the default view (no key) is setup to display the grid view, and you have a second control defined, named "Details View" with a key of "Details".
Now, when the user clicks on the select link, you would execute something like this...
Response.Redirect(EditUrl("ItemID", SelectedValue.ToString(), "Details")) |
of course, you'd have to figure out the ItemID to pass (second parameter), but that code will replace your grid view in your module with the Details View, passing ItemID to the ascx file as part of the Params collection.
In your details ascx file, get the item id like this..
If Not (Request.Params("ItemId") Is Nothing) Then
itemId = Int32.Parse(Request.Params("ItemId"))
End If
|
and finally, in your details ascx file, to return to the grid view, execute the following code...
Response.Redirect(NavigateURL(), True)
|