<%@Page Language="VB" Inherits="BaseClass" Src="MasterChild.vb" %>
<html>
<head>
  <title>DataGrid Samples - Step 3</title>
</head>
<body>
<h1> 主从关系实例</h1>
<form runat=server>
<table width="95%">
<tr> 
<td valign="top">
<b>Authors:</b><br>
<asp:DataGrid id="authorsGrid" runat="server"
    AutoGenerateColumns="false"
    BackColor="White"
    BorderWidth="1px" BorderStyle="Solid" BorderColor="Tan"
    CellPadding="2" CellSpacing="0"
    Font-Name="Verdana" Font-Size="8pt"
    DataKeyField="au_id"
    OnSelectedIndexChanged="Grid_Select"
    >
  <Columns>
    <asp:ButtonColumn Text="选择" CommandName="Select"/>
    <asp:BoundColumn HeaderText="ID" DataField="au_id">
      <HeaderStyle Width="100px"> </HeaderStyle>
    </asp:BoundColumn>
    <asp:BoundColumn HeaderText="Name" DataField="au_name">
      <HeaderStyle Width="150px"></HeaderStyle>
    </asp:BoundColumn>
    <asp:BoundColumn HeaderText="State" DataField="state">
      <HeaderStyle Width="50px"></HeaderStyle>
    </asp:BoundColumn>
  </Columns>
  <HeaderStyle BackColor="DarkRed" ForeColor="White" Font-Bold="true">
  </HeaderStyle>
  <ItemStyle ForeColor="DarkSlateBlue">
  </ItemStyle>
  <AlternatingItemStyle BackColor="Beige">
   </AlternatingItemStyle>
  <SelectedItemStyle BackColor="PaleGoldenRod" Font-Bold="true">
  </SelectedItemStyle>
</asp:DataGrid>
</td> <vr>
<td valign="top">
<asp:Panel id="detailsPanel" runat="server" Visible="false">
<table border="0" cellspacing="0" cellpadding="2" width="100%"
    style="font-family: verdana; font-size: 8pt">
    <b>Titles:</b><br>
    <td colspan="2">
      <asp:DataGrid id="titlesGrid" runat="server"
          AutoGenerateColumns="false"
          ShowFooter="true"
          BackColor="White"
          BorderWidth="1px" BorderStyle="Solid" BorderColor="Tan" CellPadding="2" CellSpacing="0"
          Font-Name="Verdana" Font-Size="8pt"
         >
        <Columns>
          <asp:BoundColumn HeaderText="ID" DataField="title_id">
            <HeaderStyle Width="100px">  
            </HeaderStyle>
          </asp:BoundColumn>
          <asp:BoundColumn HeaderText="Title" DataField="title">
            <HeaderStyle Width="250px">
             </HeaderStyle>
          </asp:BoundColumn>
          <asp:BoundColumn HeaderText="Published" DataField="pubdate" DataFormatString="{0:MMM yyyy}">
            <HeaderStyle Width="100px">
            </HeaderStyle>
          </asp:BoundColumn>
          <asp:BoundColumn HeaderText="Price" DataField="price" DataFormatString="{0:c}">
            <HeaderStyle Width="50px">
              </HeaderStyle>
            <ItemStyle HorizontalAlign="Right">
            </ItemStyle>
          </asp:BoundColumn>
        </Columns>
        <HeaderStyle BackColor="DarkRed" ForeColor="White" Font-Bold="true">
         </HeaderStyle>
        <FooterStyle BackColor="Tan">
         </FooterStyle>
        <ItemStyle ForeColor="DarkSlateBlue">
        </ItemStyle>
        <AlternatingItemStyle BackColor="Beige">
         </AlternatingItemStyle>
      </asp:DataGrid>
    </td>
  </tr>
</table>
</asp:Panel>
</td> </tr>
</table>
</form>
</body>
</html>
