Datasheet

Book IX
Chapter 1
Building Master and
Detail Pages
Developing Master and Detail Pages for ASP.NET
701
2. In the Server Behaviors panel, double-click DataGrid.
The DataGrid dialog box appears.
3. In the Columns list, select the column that you want to serve as the
link to the detail page.
You can use any field that identifies the record for expanding the detail
of the record.
4. Click the Change Column Type button.
5. Select Hyperlink from the pop-up menu.
The Hyperlink Column dialog box appears.
6. In the Hyperlink Text section, specify the text that you want to display
in the hyperlink column.
Here are your choices:
Static Text: Select this radio button if you want to use a generic
description for this column. Enter text for the link, such as Details.
Data Field: Select this radio button if you want to add text for a link
based on a hyperlink column. Then from the drop-down list, select a
data field in your dataset. In the example, we selected the last_
name column.
Format String: This field is automatically generated and shows the
format of the URL text.
7. In the Linked Page section, specify the URL for the hyperlink
column text.
Here are your choices:
Static Text: Select this radio button if you want to use a generic link
for this column. Enter the URL for the link, such as Details.aspx.
Data Field: Select this radio button if you want to add a link for data
displayed in the hyperlink column. Then from the drop-down list,
select a data field in your dataset. In the example, we selected the
first_name column.
Format String: This field is automatically generated and shows the
format of the URL link.
The URL opens the detail page and uniquely identifies the record to
display on the detail page.
8. In the Linked Page section, click the Browse button next to the Format
String box.