Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to display the value of a gridview in another girdview when i select the SELECT button in first gridview
Posted
Comments
[no name] 6-Dec-11 0:06am    
so you mean you have a select button on each row then if it is clicked, the selected row will be moved on another gridview. am i right?
santhosh1985april 6-Dec-11 0:16am    
Yes same think i want ...u kno how to do this

check this code,


in gridview's event SelectedIndexChanged:

C#
protected void grdView1_SelectedIndexChanged(object sender, GridViewPageEventArgs e)
       {
       // populate is sample method
         //where grdView1.SelectedRow.Cells[1].Text is the ID needed to
        //get data to be filled in datagridview2.
       
        grdView1.DataSource= populate(grdView1.SelectedRow.Cells[1].Text);
        grdView1.DataBind();
       }


hope it helps you..

don't forget to vote if it answers your question


thanks
 
Share this answer
 
Comments
[no name] 6-Dec-11 1:54am    
5!
refer to this link it will help u in selecting the data even after paging

Adding rows from one GridView to another after checking a checkbox in one GridView[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900