Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# SQL
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 3-Jul-12 21:29pm
Edited 3-Jul-12 21:30pm
v2
Comments
Vani Kulkarni at 4-Jul-12 2:31am
   
Are Delete and Edit buttons present outside the GridView or they are present with each row?
Naksh_27 at 4-Jul-12 2:45am
   
No its out side the grid view..

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
Naksh_27 at 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 at 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 at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 7,273
1 OriginalGriff 5,587
2 Peter Leow 4,097
3 CHill60 2,858
4 Mika Wendelius 2,850


Advertise | Privacy | Mobile
Web01 | 2.8.150224.1 | Last Updated 30 Aug 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100