本文介绍了如何将值从Gridview Rowediting事件传递到文本框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我想将gridview值传递到文本框(不在gridview中).在Gridview Rowediting事件中怎么可能?

数据库名称:Expt
表名称:客户
Gridview:Gridciew2
文本框:txtCity和txtPhone

Hello,

I want to pass gridview values to textboxes(not in gridview). How is it possible in Gridview Rowediting event?

database name : Expt
Table Name: Customer
Gridview: Gridciew2
textbox: txtCity and txtPhone

protected void GridView2_RowEditing(object sender, GridViewEditEventArgs e)
{
          // // //   What will be the code ????? 
}


<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"

                  AutoGenerateDeleteButton="True"

                  onrowdeleting="GridView2_RowDeleting" DataKeyNames="Sr_No"

                  onrowediting="GridView2_RowEditing" AutoGenerateSelectButton="True"

                  onselectedindexchanged="GridView2_SelectedIndexChanged"   >
                  <Columns>
                        <asp:BoundField HeaderText="City" DataField="City" >
                        <HeaderStyle ForeColor="CadetBlue" />
                        <ItemStyle ForeColor="Indigo" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="Phone" DataField="phone" >
                        <HeaderStyle ForeColor="CadetBlue" />
                        <ItemStyle ForeColor="Indigo" />
                        </asp:BoundField>
                        <asp:CommandField ShowEditButton="True" />
                  </Columns>
            </asp:GridView>

推荐答案



这篇关于如何将值从Gridview Rowediting事件传递到文本框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 10:47