<%@Page Language="VB" Inherits="BaseClass" Src="PagingSorting.vb" %>
<html>
<head>
  <title>Masters DataGrid 1</title>
</head>
<body>
<br>
<form runat=server>
<b>分页和排序</b><br>
<asp:DataGrid id="Grid1" runat="server"
	AutoGenerateColumns="false"
	BackColor="White"
	BorderWidth="1px" BorderStyle="Solid" BorderColor="Tan"
	CellPadding="2" CellSpacing="0"
	Font-Name="Verdana" Font-Size="8pt"

	AllowPaging="True"
	PageSize="5"
	PagerStyle-Mode="NumericPages"
	PagerStyle-HorizontalAlign="Right"
	PagerStyle-NextPageText="下一页"
	PagerStyle-PrevPageText="上一页"
	OnPageIndexChanged="MyDataGrid_Page"
	AllowSorting="true"
	OnSortCommand="MyDataGrid_Sort"
    >
  <Columns>
    <asp:BoundColumn HeaderText="Account" DataField="code_display" SortExpression="code_display">
      <HeaderStyle Width="150px">
      </HeaderStyle>
    </asp:BoundColumn>
    <asp:BoundColumn HeaderText="Group" DataField="category"  SortExpression="category">
          <HeaderStyle Width="150px">
          </HeaderStyle>
    </asp:BoundColumn>
    <asp:BoundColumn HeaderText="Type" DataField="type">
      <HeaderStyle Width="50px">
      </HeaderStyle>
    </asp:BoundColumn>
    <asp:BoundColumn HeaderText="Opening" DataField="opening">
          <HeaderStyle Width="50px">
           </HeaderStyle>
    </asp:BoundColumn>
    <asp:BoundColumn HeaderText="Closing" DataField="closing">
          <HeaderStyle Width="50px">
          </HeaderStyle>
    </asp:BoundColumn>
  </Columns>
  <HeaderStyle BackColor="DarkRed" ForeColor="White" Font-Bold="true">
  </HeaderStyle>
  <ItemStyle ForeColor="DarkSlateBlue">
  </ItemStyle>
  <AlternatingItemStyle BackColor="Beige"/>
  
</asp:DataGrid>
</form>
</body>
</html>
