<%@ Page language="c#" Codebehind="DataGridHideColumn.aspx.cs" AutoEventWireup="false" Inherits="CommonFunction.DataGridHideColumn" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>DataGridHideColumn</title>
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<h2>显示隐藏DataGrid控件中的第一列</h2>
			<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" border="0" style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 56px">
				<TR>
					<TD style="HEIGHT: 117px">
						<asp:DataGrid id="dgHideColumn" runat="server" AutoGenerateColumns="False" Width="384px" BorderColor="#CCCCCC"
							BorderStyle="None" BorderWidth="1px" BackColor="White" CellPadding="3">
							<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#669999"></SelectedItemStyle>
							<ItemStyle ForeColor="#000066"></ItemStyle>
							<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#006699"></HeaderStyle>
							<FooterStyle ForeColor="#000066" BackColor="White"></FooterStyle>
							<Columns>
								<asp:BoundColumn DataField="LastName" HeaderText="LastName"></asp:BoundColumn>
								<asp:BoundColumn DataField="FirstName" HeaderText="FirstName"></asp:BoundColumn>
								<asp:BoundColumn DataField="BirthDate" HeaderText="BirthDate" DataFormatString="{0:d}"></asp:BoundColumn>
								<asp:BoundColumn DataField="City" HeaderText="City"></asp:BoundColumn>
							</Columns>
							<PagerStyle HorizontalAlign="Left" ForeColor="#000066" BackColor="White" Mode="NumericPages"></PagerStyle>
						</asp:DataGrid></TD>
				</TR>
				<TR>
					<TD align="center">
						<asp:Button id="btnSet" runat="server" Text="显示/隐藏列"></asp:Button></TD>
				</TR>
				<TR>
					<TD>
						<asp:Label id="Message" runat="server" ForeColor="Red">Label</asp:Label></TD>
				</TR>
			</TABLE>
		</form>
	</body>
</HTML>
