Solved

update database with changes made in gridview in button click

Posted on 2011-03-10
6
519 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

838 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