文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>11.17日,GridView 的RowCommand事件中,e.CommandArgument不是行号,那么要取这一行的某一列怎么办

11.17日,GridView 的RowCommand事件中,e.CommandArgument不是行号,那么要取这一行的某一列怎么办

时间:2010-11-17  来源:挑战自我

           问题:<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false"          CommandName="SelectLaLo" CommandArgument='<%# Eval("name") %>'
                                    Text="查看"  ></asp:LinkButton>

 

    从这里可以看到,e.CommandArgument不是行号。

 

    问题: 那么我要怎么样获取这一行的某一列呢?

 

  解决:       GridViewRow row=((LinkButton )e.CommandSource).Parent.Parent as GridViewRow;

                  string address=row.Cells[3].Text.Tostring();

            

相关阅读 更多 +
排行榜 更多 +
涂色我贼强安卓版

涂色我贼强安卓版

休闲益智 下载
脑细胞太牛了手机版

脑细胞太牛了手机版

休闲益智 下载
球球的冒险旅途

球球的冒险旅途

休闲益智 下载