<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();
            }
        }

相关文章:

  • 2022-02-06
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
相关资源
相似解决方案