1
的GridView的合併單元格我有一個目前看起來像這樣一個GridView: 頁腳按鈕
我想使細胞與說添加新行跨越它上面的按鈕的2列的按鈕。
另外我想在其他4列上添加文本框,並有效地使該行成爲「添加用戶行」我是初學者,仍在試驗,詳細的解釋將非常有幫助。
這是html代碼:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="Admin.aspx.cs" Inherits="_Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<link href="css/admin.css" rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<header class="grid_9">פאנל מנהל</header>
<div class="grid_9 block_head">
טבלת משתמשים
</div>
<div class="block grid_9" id="user_block" runat="server">
<asp:GridView ID="gdview" OnRowEditing="gdview_RowEditing" DataKeyNames="id" AutoGenerateColumns="False"
CssClass="Grid" OnRowUpdating="gdview_RowUpdating" OnRowCancelingEdit="gdview_RowCancelingEdit"
runat="server" HeaderStyle-CssClass="tableheader" OnRowDeleting="gdview_RowDeleting" OnRowCreated="RowCreated"
ShowFooter="true">
<Columns>
<asp:BoundField HeaderText="מספר מזהה" DataField="id" ReadOnly></asp:BoundField>
<asp:BoundField HeaderText="שם משתמש" DataField="username"></asp:BoundField>
<asp:BoundField HeaderText="סיסמא" DataField="password"></asp:BoundField>
<asp:BoundField HeaderText="אימייל" DataField="email"></asp:BoundField>
<asp:CommandField ShowEditButton="True" CancelText="בטל" UpdateText="עדכן" EditText="ערוך"></asp:CommandField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lnkdel" runat="server" Text="מחק" CommandName="Delete"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<FooterTemplate>
<asp:Button ID="ButtonAdd" runat="server" Text="Add New Row" />
</FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</asp:Content>
的感謝!