Gridview is not updating

It enables you to select, sort, and edit these items.

In this article, I am going to explain how to insert, update or delete a row from a grid view control. At run time, the Eval method calls the Eval method of the Data Binder object.

gridview is not updating-43

your help will be highly appreciated.error is: Error 1 'System.

I am using below lines to do the same.protected void Grid View1_Row Editing(object sender, Grid View Edit Event Args e) but getting error for Row Index which is as below.

Parameter name: index Any idea what I need to do to fix this issue? It is very useful to us in practical in our collage project.

And thankful of this link.thanks, Ritesh vyas How to update a dropdownlist in the gridview?

The problem come from UPDATE Statement [Error is New line constant I remove the plus sign and quotes after that it works properly] Thank u once again I m in a big problem in grdview i m trying to edit it throw command text ="edit" and insert vale on text box with save btnsave click..i m try if textbox insert vale are fill in gridview if btnsave click and if we wandt to edit it then on the same btnsave it save updated data use this for resolve updating errorsql Statement = "UPDATE Customers SET Company Name = @Company Name, Contact Name = @Contact Name, Contact Title = @Contact Title, Address = @Address, Country = @Country WHERE Customer ID = @Customer ID"; Thank you so much for this great tutorial! When i edit and click on update, it doesn't update anything. sql Statement = "UPDATE allmovies SET title = @title,company = @company,director = @director,editor = @editor WHERE id = @id"; hi vinz,my code for update command is public void update(string name, string email, int phone) and ROW UPDATING EVENT IS AS FOLLOWS string name = ((Text Box)Grid View1.

update command is not working also it is not showing any error ,i guess something is wrong with the update command my tables phone is primary key hifrnd,i m little confused with the concept of gridview.are required to rebind gridview after rowediting event.we do not bind it again then we have to click twice on edit button to run this event...why? Please review the stack trace for more information about the error and where it originated in the code. I am trying to change the value in textbox but after submitting the changed value is not coming. Description: An unhandled exception occurred during the execution of the current web request. S: I will appreciate your help - I'm trying to do this for my diploma and I'm kinda depressed :)) please help : D I am trying this above method but it returns me the old value. my gridview updating code like this........----------------------------------------------------------------------------------------protected void Grid View1_Row Updating(object sender, Grid View Update Event Args e) ------------------------------------------------------------------------------------and i got error like this..----------------------------------------------------Incorrect syntax near '='. NET 2003 this is query sql Statement = "UPDATE addcompany" "SET Company Name = @Company Name, Contact Name = @Contact Name," "Contact Title = @Contact Title, Address = @Address, Country = @Country" "WHERE Customer ID = @Customer ID,"; Use this:sql Statement = "UPDATE addcompany SET Company Name = @Company Name, Contact Name = @Contact Name, Contact Title = @Contact Title, Address = @Address, Country = @Country WHERE Customer ID = @Customer ID"; Its very clear,simple and understandable to the freshers also. Source Error: Line 62: Sql Command cmd = new Sql Command("update districtinfo set district ='" st2 "' , taluka ='" st3 "' , crope ='" st4 "' , piyat ='" st5 "' , area ='" st6 "' where id =" st1 "", cn); Line 63: cn. Can any one help me in urgent basis; It has to be done in VB. If I click on edit & then I hit cancel, that portion works.