Click here to Skip to main content
12,354,349 members (71,688 online)
Rate this:
 
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 20:29pm
Edited 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

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

Solution 1

  Permalink  
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 30 Aug 2012
Copyright © CodeProject, 1999-2016
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