当前位置: 代码迷 >> ASP.NET >> GridView选择解决思路
  详细解决方案

GridView选择解决思路

热度:7233   发布时间:2013-02-25 00:00:00.0
GridView选择
我在GridView的列里面加了个 选择按钮 列:<asp:CommandField SelectText="选择" ShowSelectButton="True" />

各位师兄能不能告诉我怎么 在点击按钮时,获得该行的 第一个cell的值!!盼告知......

------解决方案--------------------------------------------------------
((TextBox)GridView1.Rows[e.RowIndex].Cells[0].Controls[0]).Text.ToString();
------解决方案--------------------------------------------------------
给你个我写现成的 
前台
HTML code
            <asp:TemplateField HeaderText="修改">             <ItemTemplate>               <asp:LinkButton  ID="lb_Modify" Text="修改" runat="server" OnCommand="lb_Modify_Command"  CommandArgument='<%#Eval("ID") %>'/>             </ItemTemplate>             <ControlStyle ForeColor="Blue" />            </asp:TemplateField>
  相关解决方案