【问题标题】:Detailsview on ModalPopUp only displays first row of gridviewModalPopUp 上的 Detailsview 仅显示 gridview 的第一行
【发布时间】:2013-04-07 09:36:23
【问题描述】:

我在 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();
    }

【问题讨论】:

    标签: c# asp.net ajax gridview modalpopupextender


    【解决方案1】:

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

    protected void gvStudent_SelectedIndexChanged(object sender, EventArgs e)
        {
            dvstudent.PageIndex = gvStudent.SelectedIndex;
        }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多