GridView的问题
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" OnRowCommand="GridView1_RowCommand" OnRowDeleted="GridView1_RowDeleted" OnRowDeleting="GridView1_RowDeleting" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"><Columns>
<asp:BoundField HeaderText="Username" DataField="UserName" />
<asp:BoundField HeaderText="PassWord" DataField="Password" />
<asp:BoundField HeaderText="Email" DataField="Email" />
<asp:BoundField HeaderText="Sign" DataField="Sign" />
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="Txt" runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="add" runat="server">添加</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
如何取得当点添加按钮时 选中列中TextBox的内容?
今天没分了.. 知道的大大拜托解答下吧..
下班前要做出来
--------------------编程问答-------------------- 江湖救急啊 大哥们..
我是真没辙了.. 实在不行 改明天我有分了再贴个帖子给您补上行不..
快下班了 救命啊 --------------------编程问答-------------------- 我今天闲得无聊,发个给你看看吧
TextBox dl = GridView1.Rows[i].FindControl("TextBox") as TextBox;
dl.text= ds.Tables[1].Rows[i]["值"].ToString(); --------------------编程问答-------------------- 补一下
for (int i = 0; i < GridView1.Rows.Count; i++)
{
TextBox dl = GridView1.Rows[i].FindControl("TextBox") as TextBox;
dl.text= ds.Tables[1].Rows[i]["值"].ToString();
}
补充:.NET技术 , ASP.NET