Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I when i run my code it displays a form and a gridview (displaying all the database records) and when i click on edit in my gridview i want all the data gets filled in the form and when i submit that form it gets updated both in the database and gridview.
Posted
Updated 16-Dec-12 19:56pm
v4
Comments
Vani Kulkarni 17-Dec-12 1:42am    
Have you written an article or asking a question?
Arpit Garg1 17-Dec-12 2:02am    
please anyone help me out its urgent
Thank you in advance.

C#
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        //find the value control who's value you want
        TextBox tb = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtCityEdit");


}

on row Updating event u can read the grid view controls, read the control values and bind to where you want, try this.
 
Share this answer
 
Please follow the link, you will get some hints how to update in gridview

Implementing Cumulative total and Select All functionality with Events in ASP.NET GridView[^]

Thanks
 
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