Solved

update database with changes made in gridview in button click

Posted on 2011-03-10
6
518 Views
Last Modified: 2012-05-11
Hi,
I have a gridview in my asp.net page, in button click event i want to update the database with the changes made in the gridview. I dont want to use gridview's auto edit and update features. Please help me. I attached the snap shot of my gridview I will do change in the dropdown list with in the girdview, ill do the changes wherever needed and i want to update the database according to changes done in gridview. or if its ok/good i want to update the row by clicking on the update button within the row as shown in the gridview. help me in doing this.
thanks in advance
gridview.JPG
0
Comment
Question by:CPSRI
  • 3
  • 3
6 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 35093579
Did you try to use the update-method of your dataadapter ?

this.your_dataAdapter_name.Update(your_dataset_rhat_fill_the_datagrid);

0
 

Author Comment

by:CPSRI
ID: 35096354
Thank you Dhaest, for your reply , i dont have data adapter because i am using Sql data source. If there is a way to use dataadapter when we are working with sqldatasource, Please let me now.  
0
 

Author Comment

by:CPSRI
ID: 35131958
is there any way Dhaest?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 53

Expert Comment

by:Dhaest
ID: 35135639
Insert Update Edit Delete record in GridView using SqlDataSource ASP.NET

http://csharpdotnetfreak.blogspot.com/2009/05/gridview-sqldatasource-insert-edit.html
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 35135702
Or do you want to write your  own update-query, take a look at the sqlCommand-object
http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson03.aspx 
0
 

Author Closing Comment

by:CPSRI
ID: 35369020
thank u so much
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question