GridViewEdit.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GridViewEditTest.aspx.cs" Inherits="GridViewEditTest" %>
<!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>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Panel ID="pnlEdit" runat="server" Height="50px" Width="684px" Visible="False">
姓名:<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>地址:<asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>邮编<asp:TextBox ID="txtPostCode" runat="server"></asp:TextBox><asp:Button ID="btnOK" runat="server" Text="确定" OnClick="btnOK_Click" />
<asp:Button ID="btnCancel" runat="server" Text="取消" OnClick="btnCancel_Click" /></asp:Panel>
<br />
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="CLientID"
GridLines="Horizontal" OnPageIndexChanging="GridView1_PageIndexChanging" OnSelectedIndexChanging="GridView1_SelectedIndexChanging" AllowPaging="True">
<FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="ClientName" HeaderText="姓名" SortExpression="ClientName" />
<asp:BoundField DataField="AddressStr" HeaderText="地址" SortExpression="AddressStr" />
<asp:BoundField DataField="PostCode" HeaderText="邮编" SortExpression="PostCode" />
</Columns>
<RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
<PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
<AlternatingRowStyle BackColor="#F7F7F7" />
</asp:GridView>
</div>
</form>
</body>
</html>
版权与免责声明
1、本站所发布的文章仅供技术交流参考,本站不主张将其做为决策的依据,浏览者可自愿选择采信与否,本站不对因采信这些信息所产生的任何问题负责。
2、本站部分文章来源于网络,其版权为原权利人所有。由于来源之故,有的文章未能获得作者姓名,署“未知”或“佚名”。对于这些文章,有知悉作者姓名的请告知本站,以便及时署名。如果作者要求删除,我们将予以删除。除此之外本站不再承担其它责任。
3、本站部分文章来源于本站原创,本站拥有所有权利。
4、如对本站发布的信息有异议,请联系我们,经本站确认后,将在三个工作日内做出修改或删除处理。
请参阅权责声明!