Web/SmartGridView.aspx

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="SmartGridView.aspx.cs" Inherits="SmartGridView" Title="SmartGridView测试"
    EnableViewState="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="Server">
    <div id="result" runat="Server">
    </div>
    <div>
        SmartGridView1</div>
    <div style="margin: 5px 0px">
        <asp:Button ID="btnExcel" runat="server" Text="导出为Excel" CommandName="ExportExcel"
            OnCommand="btn_Command" />
        <asp:Button ID="btnWord" runat="server" Text="导出为Word" CommandName="ExportWord" OnCommand="btn_Command" />
        <asp:Button ID="btnText" runat="server" Text="导出为Text" CommandName="ExportText" OnCommand="btn_Command" /></div>
    <yyc:SmartGridView ID="sgv1" runat="server" AllowPaging="True" AllowSorting="true"
        PageSize="20" DataSourceID="ObjectDataSource1" MouseOverCssClass="OverRow" DataKeyNames="name"
        Width="1200" BoundRowDoubleClickCommandName="DoubleClick" OnRowCommand="sgv_RowCommand"
        ContextMenuCssClass="RightMenu">
        <Columns>
            <asp:TemplateField ItemStyle-Width="50px">
                <headertemplate>
                    序号
                </headertemplate>
                <itemtemplate>
                    <%# Container.DataItemIndex + 1 %>
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField ItemStyle-Width="50px">
                <headertemplate>
                    <asp:CheckBox ID="all" runat="server" />
                </headertemplate>
                <itemtemplate>
                    <asp:CheckBox ID="item" runat="server" />
                </itemtemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="id" HeaderText="ID" SortExpression="id" />
            <asp:BoundField DataField="name" HeaderText="名称" SortExpression="name" />
            <asp:BoundField DataField="age" HeaderText="年龄" SortExpression="age" />
            <asp:BoundField DataField="salary" HeaderText="薪水" SortExpression="salary" />
            <asp:BoundField DataField="id" HeaderText="ID" SortExpression="id" />
            <asp:BoundField DataField="name" HeaderText="名称" SortExpression="name" />
            <asp:BoundField DataField="age" HeaderText="年龄" SortExpression="age" />
            <asp:BoundField DataField="salary" HeaderText="薪水" SortExpression="salary" />
            <asp:ButtonField CommandName="DoubleClick" Visible="false" />
            <asp:ButtonField CommandName="RightMenuClick" Visible="false" />
        </Columns>
        <SmartSorting AllowMultiSorting="True" AllowSortTip="True" />
        <ClientButtons>
            <yyc:ClientButton BoundCommandName="Sort" Position="first" AttributeKey="onclick"
                AttributeValue="return confirm('确认对字段“{1}”排序吗?')" />
        </ClientButtons>
        <CascadeCheckboxes>
            <yyc:CascadeCheckbox ChildCheckboxID="item" ParentCheckboxID="all" />
        </CascadeCheckboxes>
        <FixRowColumn FixRowType="Header,Pager" TableHeight="400px" TableWidth="600px" FixRows="0"
            FixColumns="0,1" />
        <CheckedRowCssClass CheckBoxID="item" CssClass="SelectedRow" />
        <ContextMenus>
            <yyc:ContextMenu Text="RightMenuClick" BoundCommandName="RightMenuClick" />
            <yyc:ContextMenu Text="<hr />" />
后面还有 62 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。