C#表格,表格信息、GridView使用。
阅读原文时间:2023年07月09日阅读:1

page:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="test1.ascx.cs" Inherits="DotNetNuke.Modules.HRAddUser.test1" %>

<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>  

  Controller:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="test1.ascx.cs" Inherits="DotNetNuke.Modules.DataInfo.test1" %>

<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>  

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器

你可能感兴趣的文章