RowCommand

<asp:LinkButton ID="lbtnLogisticsEdit" runat="server" CommandName="LogisticsEdit" Text ="编辑"></asp:LinkButton>   

protected void grvOrderInfo_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        GridViewRow row = ((GridViewRow)(((LinkButton)(e.CommandSource)).Parent.Parent)); //此得出的值是表示那行被选中的索引值
        Label lblListId = (Label)row.FindControl("lblListId");
                if (e.CommandName == "LogisticsEdit")
        {
         }

    }

posted on 2011-06-01 12:57  EveryMan  阅读(149)  评论(0)    收藏  举报

导航