一个还不错的DateGrid样式

<asp:DataGrid ID="NewGrid" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" Width="99%" AutoGenerateColumns="False" ShowFooter="true">
        <FooterStyle BackColor="#B8E1E2" Font-Bold="True" ForeColor="White" />
        <EditItemStyle  HorizontalAlign="Center" BackColor="#2461BF" />
        <SelectedItemStyle BackColor="#D1DDF1" ForeColor="#333333"  HorizontalAlign="Center" Font-Bold="True"  />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <AlternatingItemStyle BackColor="#F3F8F7"  HorizontalAlign="Center" />
        <ItemStyle  HorizontalAlign="Center" Font-Size="Small" BackColor="White"/>
        <HeaderStyle BackColor="#B8E1E2" Font-Bold="True" HorizontalAlign="Center" ForeColor="#73938E" />
        <Columns>
          <asp:BoundColumn DataField="name" HeaderText="科室名称"></asp:BoundColumn>
          <asp:BoundColumn DataField="charge" HeaderText="负责人"></asp:BoundColumn>
          <asp:BoundColumn DataField="sign" HeaderText="状态"></asp:BoundColumn>
          <asp:HyperLinkColumn Text="修改" DataNavigateUrlField="id" DataNavigateUrlFormatString="edit_dept.aspx?DeptId={0}" HeaderText="修改"></asp:HyperLinkColumn>
          <asp:HyperLinkColumn Text="注销" DataNavigateUrlField="id" DataNavigateUrlFormatString="cancel.aspx?DeptId={0}" HeaderText="注销"></asp:HyperLinkColumn>
        </Columns>
    </asp:DataGrid>

 

你可能感兴趣的:(asp)