Faisal Ansari

Faisal Ansari

  • NA
  • 451
  • 833.6k

How can i bound values Grid to Grid in asp.net

Jul 20 2011 3:23 AM
hello guys how r u ?

i am in some problem here 

my questions is that,

i have an gridview which is being load on behalf of behalf of dropdownlist and i have an update linkbutton, when i press update linkbutton then the other gridview should load  but only one column of 1st gridview should load in second gridview 

my code is below,

    protected void lbnUpdate_Click(object sender, EventArgs e)
    {
        foreach (GridViewRow gvr in GridView1.Rows)
        {
            string answerText = gvr.Cells[3].Text;
            //Response.Write("<br>" + answerText);
            foreach (GridViewRow gvr2 in GridView2.Rows)
            {
                ((TextBox)gvr2.Cells[3].FindControl("txtAnswers")).Text = answerText;
            }
           
        }


        ModalPopupExtender1.Show();
    }

this code is running perfect with out any error but the second gridview was not loading 

please i need some help from you

Reply Soon 

its urgent

thanks.



Answers (1)