Solved

update database with changes made in gridview in button click

Posted on 2011-03-10
6
521 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
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 …
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

705 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