Click here to Skip to main content
16,018,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I am a beginner developer and i need a gridview that allows you to edit all fields when you click an 'edit' button, allows you to make the changes then saves all the changes to the database when you click on a 'save' button. Any help would be much appreciated.
Posted

 
Share this answer
 
Comments
Ruwaldo 3-Jul-12 8:27am    
Thanks, but i need the edit button outside the gridview and when clicked all the fields must become editable.
pradiprenushe 3-Jul-12 8:37am    
Why this is required? This is easy to do but not realistic. This can affect website performance. Plz got through requirement again.
Ruwaldo 3-Jul-12 10:30am    
I need to do it this way because there is a total textbox at the bottom of the gridview that is the total of the 'amount' column in my gridview. So my program needs to check if the edited data adds up to zero before the user can update the table in the database. If only one row can be edited at a time then the user first has to click update or cancel to be able to edit the other amount, which is undesirable.
 
Share this answer
 
Comments
Teena_27 5-Jul-12 2:31am    
Hi Amit,

Can you please give code for Windows application were in form i can delete and edit selected row and update in database,, this all above links for Web application.

Thanks !!
waiting for your solution !
_Amy 13-Jul-12 8:15am    
Hi teena.
Here is a good article on it. Have a look:
http://www.codeproject.com/Articles/17318/Add-Edit-and-Delete-in-DataGridView-with-Paging
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridvieweditmode.aspx
http://nareshkamuni.blogspot.in/2012/04/how-to-insert-edit-update-and-delete.html

All the best.
I have found what I am looking for...Edit Entire 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