0

我在 modalpopup 中有一个 detailsview,它应该在我的 gridivew 中显示选定的行,但它只显示我的 gridview 中的第一行。我做错了什么?感谢您的帮助。

 protected void gvStudent_SelectedIndexChanged(object sender, EventArgs e)
    {

        this.dvstudent.Visible = true;
        this.dvstudent.DataBind();
        this.UpdatePanelDetailsView1.Update();
        this.modalstudent.Show();


    }
 protected void Selecttomodifystudent_Click(object sender, EventArgs e)
    {
        LinkButton buttonstudent = sender as LinkButton;
        GridViewRow row = (GridViewRow)buttonstudent.NamingContainer;
        this.sqlModifyStudent1.SelectParameters.Clear();
        this.dvstudent.DataBind();
        this.UpdatePanelDetailsView1.Update();
        this.modalstudent.Show();
    }
4

1 回答 1

1

我找到了我的问题的答案。就在我眼前:

protected void gvStudent_SelectedIndexChanged(object sender, EventArgs e)
    {
        dvstudent.PageIndex = gvStudent.SelectedIndex;
    }
于 2013-04-15T22:25:34.377 回答