GridView 模板列 在后台获取该行某控件的值 例如批量修改

   protected void txtFILESAVEFEE_TextChanged(object sender, EventArgs e)
    {
        TextBox t = (TextBox)sender;
        int Index = ((GridViewRow)(t.NamingContainer)).RowIndex;//获得行号
        GridViewRow gRow = GridView1.Rows[Index];
        TextBox tb = (TextBox)gRow.FindControl("txtFILESAVEFEE");

        Response.Write("<script>alert('" + tb.Text.ToString() + "')</script>");
    }
}

posted @ 2012-12-12 16:25  深南大道  阅读(220)  评论(0编辑  收藏  举报