1
Answer

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

Ask a question
Faisal Ansari

Faisal Ansari

13y
1.6k
1
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)