1.18. Displaying a Pop-Up Details Window
Problem
You want to provide additional
details for each row in a
DataGrid using a pop-up window.
Solution
Add a Details button to each row in the Datagrid.
When the user clicks the button, open a new browser window, obtain
the information from the server, and then display the detailed
information in a pop-up window. An example of the output that is
possible with this approach is shown in Figure 1-22
(sample DataGrid) and Figure 1-23
(sample pop-up window output). As with the other recipes in this
book, we’ve implemented a complete application that
illustrates this approach. The form and code-behind for the page
containing the sample DataGrid is shown in
Example 1-51 through Example 1-53, and the form and code-behind for the sample
pop-up window is shown in Example 1-54
through Example 1-56.

Figure 1-22. DataGrid with pop-up details window output

Figure 1-23. Pop-up details window output
Discussion
To implement this solution, create a DataGrid in
the normal fashion, but add a link button column to display a Details
link. The idea is that when the user clicks the Details link within a
row of the DataGrid, the browser opens a new window and requests the appropriate page from the server. In the context of our example that implements this solution, a book ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access