zoukankan      html  css  js  c++  java
  • gridview_RowCommand 获取当前行中的控件

     <asp:GridView ID="gvStorglog" runat="server" Width="100%" SkinID="gridviewSkin" AutoGenerateColumns="false"
                OnRowCommand="gvStorglog_RowCommand">
                <Columns>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbEdit" runat="server" CommandName="Modify" CommandArgument='<%# Eval("PC_ID")%>'>退单</asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="left" Wrap="false" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="PC_CODE" HeaderText="企业名称"></asp:BoundField>
                    <asp:TemplateField HeaderText="企业名称">
                        <ItemTemplate>
                            <asp:TextBox CssClass="inputStyle" Width="94%" Text='<%#DataBinder.Eval(Container.DataItem, "PC_NAME")%>'
                                ID="txtPC_NAME" runat="server"></asp:TextBox>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>

    protected void gvStorglog_RowCommand(object sender, GridViewCommandEventArgs e)
            {
                if (!string.IsNullOrEmpty(e.CommandArgument.ToString()))
                {
                    TextBox text = (TextBox)((Control)e.CommandSource).FindControl("txtPC_NAME");
                    string aa = text.Text.ToString();
                }
            }

  • 相关阅读:
    Python Semaphore
    Python 互斥锁
    Python 递归锁
    Python GIL锁
    Python 线程调用
    进程与线程
    Python paramiko模块
    Python SocketServer模块
    MonoDevelop with Visual Studio to Linux and Mac OSX maintaining a single code base for all platforms.
    mime大全收集
  • 原文地址:https://www.cnblogs.com/amylis_chen/p/3173051.html
Copyright © 2011-2022 走看看