Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

In my form have two Buttons DELETE AND EDIT AND ONE GRID VIEW...

I want it if i select 1row from grid view and after that i click on delete button the row should get deleted from grid view as well as from database...
same for edit also.

I tried codes from Google as well but its not working as i want.

Please some one give me solution for this.

Thank you in advance !!!!
Posted
Updated 3-Jul-12 20:30pm
v2
Comments
Vani Kulkarni 4-Jul-12 2:31am    
Are Delete and Edit buttons present outside the GridView or they are present with each row?
Naksh_27 4-Jul-12 2:45am    
No its out side the grid view..

1 solution

 
Share this answer
 
Comments
Naksh_27 4-Jul-12 2:49am    
Hey thanks,,, but your both the link is for web pages and i am developing a windows form.
Can you please suggest any other link or code for windows application?
Abhinav S 4-Jul-12 2:51am    
Sorry. Try http://khanrahim.wordpress.com/2010/04/10/insert-update-delete-with-datagridview-control-in-c-windows-application/.
Naksh_27 4-Jul-12 4:15am    
Its giving error like this for connection string

The ConnectionString property has not been initialized.

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