C#表格,表格信息、GridView使用。

page:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="test1.ascx.cs" Inherits="DotNetNuke.Modules.HRAddUser.test1" %>
<asp:Panel ID="panMain" runat="server">
    <style type="text/css">
        .GridHead th {
            text-align: center;
        }
    </style>

    <table style="border: 1px solid #e1e0e0">
      
        <tr>
            <td>
                <asp:GridView ID="gridTosInfoprs" runat="server" AutoGenerateColumns="False"
                    BackColor="White" BorderColor="#dfdede" BorderStyle="None" BorderWidth="1px"
                    CellPadding="3" CssClass="GridFont" GridLines="Vertical" 
                   OnRowCreated="gridTosInfoprs_RowCreated" 
                    Style="margin-top: 10px">
                    <PagerSettings Mode="NumericFirstLast" />
                    <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                    <Columns>
                        <asp:BoundField HeaderText="序号" />
                        <asp:BoundField HeaderText="xx编号" DataField="xxxxNo(datatablecolumn)" />
                        <asp:BoundField HeaderText="xxx名称" DataField="xxxxxName" />
                        <asp:BoundField HeaderText="xxx金额" DataField="xxxReward" />
                   </Columns>
                    <RowStyle BackColor="#ffffff" ForeColor="Black" />
                    <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#0ea915" Font-Bold="True" ForeColor="White" CssClass="GridHead"/>
                    <AlternatingRowStyle BackColor="#f8f8f8" />
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Panel>

  Controller:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="test1.ascx.cs" Inherits="DotNetNuke.Modules.DataInfo.test1" %>
<asp:Panel ID="panMain" runat="server">
    <style type="text/css">
        .GridHead th {
            text-align: center;
        }
    </style>

    <table style="border: 1px solid #e1e0e0">
      
        <tr>
            <td>
                <asp:GridView ID="gridTosInfoprs" runat="server" AutoGenerateColumns="False"
                    BackColor="White" BorderColor="#dfdede" BorderStyle="None" BorderWidth="1px"
                    CellPadding="3" CssClass="GridFont" GridLines="Vertical" 
                   OnRowCreated="gridTosInfoprs_RowCreated" 
                    Style="margin-top: 10px">
                    <PagerSettings Mode="NumericFirstLast" />
                    <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                    <Columns>
                        <asp:BoundField HeaderText="序号" />
                        <asp:BoundField HeaderText="xx编号" DataField="xxxxNo(datatablecolumn)" />
                        <asp:BoundField HeaderText="xxx名称" DataField="xxxxxName" />
                        <asp:BoundField HeaderText="xxx金额" DataField="xxxReward" />
                   </Columns>
                    <RowStyle BackColor="#ffffff" ForeColor="Black" />
                    <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#0ea915" Font-Bold="True" ForeColor="White" CssClass="GridHead"/>
                    <AlternatingRowStyle BackColor="#f8f8f8" />
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Panel>

  

C#表格,表格信息、GridView使用。

上一篇:新的服务器部署_乌班图14.04


下一篇:小程序-时间戳转时间方法