ShowHideGridViewColumnsServer.aspx
(完整代码) 1KB<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShowHideGridViewColumnsServer.aspx.cs" Inherits="ShowHideGridViewColumnsServer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Show / Hide Gridview Columns on the Server Side</title>
</head>
<body>
<form id="form1" runat="server">
<h3>Show / Hide Gridview Columns on the Server Side</h3>
<a class="printHideMe" href="Default.aspx">Back to Menu</a>
<p class="description">
Try clicking on the minus symbols in the GridView column headers.
<br />Use the dropdown list to show the columns again.
<br />Try "Print Preview" in your browser to see how the page will print.
</p>
<div>
<asp:GridView ID="GridView1" runat="server"
OnRowCreated="GridView1_RowCreated"
OnRowCommand="GridView1_RowCommand"
DataKeyNames="Id">
<HeaderStyle CssClass="gvHeader" />
<RowStyle CssClass="gvRow" />
</asp:GridView>
<div class="showHideColumnsContainer">
<asp:DropDownList ID="GridView1ShowHideColumns" runat="server" Visible="false"
AutoPostBack="true" OnSelectedIndexChanged="GridView1ShowHideColumns_SelectedIndexChanged" />
</div>
</div>
</form>
</body>
</html>
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
