Updateing a Datagridview

I have an application where I am presenting data to the user with a DataGridView that has as its datasource a SqlDataSource. The data is presented fine and the user is able to edit the fields that they are allowed to just fine. The problem arises though when they click on a button to do an update on the database. The button creates a SqlCommand and this command goes out and modifies all record that meet a certain criteria. The records that are modified should no longer appear on the gridview, however the data in the SqlDataSource appears to not change, even though the page is reloading.

 I know I am missing somthing simple here, some step to force an update on the SqlDataSource. Can anyone point me in the direction I should be looking ?



12/4/2006 5:32:27 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 14
Get it on Google Play
Get it on Apple App Store

Well I was right... it was somthing simple that I was overlooking. I was calling databind on the sqldatasource and not the gridview. Once I changed that the rows dropped off just fine.
12/4/2006 6:06:04 PM

Similar Artilces:

on update something in the datagridview, it should be updated in the database and datagridview should be refreshed with the updated data
1. I have a Windows Form app where I am binding a DagridView to a Dataset which was filled from a SQL Server database table. 2. I then have a method to Update the database.3. Problem: My Update method no longer works.  And also I wanted to do insert and delete operations in the datagridview. When I update something in the datagridview, it should be updated in the database and datagridview should be refreshed with the updated data.  I have wasted total day in searching of 'how to insert delete and edit the datagridview and that updates database as well. Please help me. Its a W...

Help me update related controls after a control was updated.
I have nested UserControls on page. What I need to do is to update Profile UserControl after an item was deleted from the list of items. We are using AJAX (ATLAS) in our project. Which principle do I need to use to accomplish that task? How would you do it? Thank you. "A successful person is one who can lay a firm foundation with the bricks that others throw at him." http://www.russiangeek.com/ hello. well, can you explain this a little better?-- Regards,Luis Abreuemail: labreu_at_gmail.comEN blog:http://msmvps.com/blogs/luisabreu Luis Abreu: hello. well...

Data presentation control in another Data presentation control
 Hello,I want to make a menu with datalist or gridview control.Basically,the menu will be like this,Categories     Sub Categories.For example, for COMPUTING category there will be NOTEBOOKS DESKTOPS etc.There will be a image for CATEGORIES and linkbuttons with Subcategories.If I put a datalist inside a datalist and a link button inside the second datalist visually it satisfies my need.However,CommandArguments come from database to linkbutton.Andwhen one of these command buttons is cliked it must go to proper page.I dont know how to wrie an event_handler ,specifically, for...

Updating Data Presentation Controls
Hi folks, I have a question that has been nagging me for awhile and I haven't found a *good* solution around it. (It's probably dead simple to an experienced programmer)When updating any presentation control (gridview, formview...etc), how do I ensure that the value in that database stays the same and does not get a "null" value when there has been no change?I know the problem is solved with I *think* with Viewstate? (correct me if im wrong), and the value currently in the field is the default when changing to Editmode. However, in cases where I might delete that value...

Updation of datagridview in vb.net
Hi to allnow i would like to update the database through datagridview  in VB.NET...can anyone help me regarding this issue..........  Thanks to all ......  Hi:   You can read this tutorial first: VB GridView Updating http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/data/gridview.aspx   RegardsSincerely,Allen ChenMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help. can any one help me out how to update records in DataGridView without using Data provider compone...

How do I update from two DetailsView controls using thebuilt-in Update button of one control?
I have two DetailsView Controls.  I want to update my database with the values in both the first and second DetailsView controls when I click the Update button on the first control.  Actually, I want to do the same thing with the Insert(Add) button. Any suggestions would be greatly appreciated.  ...

How can we access a control outside the update panel with an control inside the update panel
Take a very simple example, i have a button inside the update panel along with other controls and i have a textbox on the page.What i want is that when i click the button inside the update panel,it should update the textbox which is present outside the update panel.How can i do this?Prakash kumar To my knowledge you cannot update any control outside of the update panel.  If you want to update the control move it inside the update panel. Do you want to modify the text box with server-side code? If so, put it in its own UpdatePanel. Set the UpdateMode on the panel to Conditional. Then...

how to update the datagridview in vb .net 2005
Hi friends, I have a datagridview. It contains number of rows. Imagine if the user clicks any one of the row and click the update button, then that particular rows (one field i.e status should be changed in the database). Can you please give me the coding for it.  I need it in vb .net 2005. Thanks, venkat..  Use the following sample code. <%@ Page language="VB" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> Sub ...

AJAX: which is better more controls inside one update panel or few controls inside more update panels
hi in form that have many controls , gridview , formview, buttons, textboxes, etc. which is better, put them all in one update panel, or few controls in more update panels? i.e. gridview , formview, buttons, textboxes all in one update panel or gridview in update panel, formview in updat panel, buttons (that text needs to change based on some business rules) in update panel, etc? besides will tables and divs inside update panel affect AJAx performance?! Hi,    Putting too many controls in an update panel will certainly affect the performance. I have certainly faced it. ...

Updates, updates and more updates
Name: pirhan Email: pirhan_chanathotmaildotcom Product: Firefox Summary: Updates, updates and more updates Comments: Hello, Normally I use Safari, but my iBook is out of commission for a while. So, I am forced to use a PC to which I would much rather use Firefox than Internet Exploder. However, as much I enjoy not using a Microsoft product, and use a product that works decently, I am severely annoyed about the constant updates I am put through. In the last two days, I had to wait for Firefox to install updates before I could browse and now, I'm alerted that there'...

Controls in Update Panel not updating
I have a Update Panel with 2 textboxes and a button. When button is clicked, I am changing the value of one of the textboxes. When the partial rendering occurs, the textbox value is not changed. I am new to Atlas, is there something I am missing? Below is the code. -- codebehind -- This line of code is executed when I run in debug mode. txtUsername.Text = "Invalid Login"; -- aspx -- <atlas:ScriptManager ID="sm" runat="server" EnablePartialRendering="true" /> <atlas:UpdatePanel ID="upLogin" runat="server" Mode="always"> <ContentTemplate> <table border="0" width="3...

updates, updates, updates
Name: hans jensen Email: hansjensen44_athotmaildotcom Product: Firefox Summary: updates, updates, updates Comments: why is it everytime i go online firefox has new updates, 3 -4 times every day, its never ending..........whats all the problems??? please email me and let me know, ty,.........Hans Jensen Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070219 Firefox/ ...

updates, updates, updates
Holy Crap, Batman! You'd think I was running Windows XP and it's patch Tuesday. So far this week - new kernel (, 2 new browsers (Opera 9.63 and Firefox 3.05) and a new plugin (Flash I'm about ready to try one od the BSD's! vince wrote: > Holy Crap, Batman! You'd think I was running Windows XP and it's patch > Tuesday. > > So far this week - new kernel (, 2 new browsers (Opera 9.63 > and Firefox 3.05) and a new plugin (Flash I'm about ready > to try one od the BSD's! I take ...

updates, updates, updates, NO MORE!
Name: Andreas Email: unbekanntatjokerdotms Product: Firefox Summary: updates, updates, updates, NO MORE! Comments: Hi ! if you want to develop a fine webbrowser, maybe you nee a new management. To release a new buggy version every two weeks is not very professional. Test your software before the release and let the user download a stable browser. this update-orgy since 2.0.0 used me to use Opera instead of FF. We haved use FF in our Company, but we can't deploy a new version every week to +200 Windows-clients, so in our company we've decided to return to IE, ...

Updates Updates Updates
I was a big fan of Firefox.. Now, I don't even like to use it. Seems like every time I start it up I have to update some addin OR the browser itself. And unfortunately the update nag messages are always presented when I start a browsing session. I find this annoying because, typically, when I open a web browser all I want to do is go to a web page. Not update the browser. I can agree that staying current with the latest version could give the best, fastest, safest web experience. But that point becomes mute when I start off every other browsing session with a new update. And mos...

Web resources about - Updateing a Datagridview - asp.net.presentation-controls

Newest 'entity-framework' Questions - Stack Overflow
Q&A for professional and enthusiast programmers

Mono 2.0 released, brings C# 3.0 to Linux and Mac OS X
The Mono project, which develops an open-source and cross-platform …

CodePlex - Project Directory
Project hosting for open source software.

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

C# Corner - Developers and IT Professionals Community
Community for Developers and IT Professionals

Synchronize Now! - Dr Dobb's
Eric uses Amazon.com's S3 web service and .NET 2.0's FtpWebRequest class to securely synchronize files on multiple machines.

Design Patterns: Architecture of an Autonomous Application
Sign in MSDN subscriptions Get tools http://www.facebook.com/microsoftdeveloper https://twitter.com/msdev http://plus.google.com/111221966647232053570/ ...

Utilities - Software Downloads - PCWorld
Utilities downloads software and reviews .NET DataGridView Columns assembly for .NET 2.0, 3.0, 3.

Tutorials - Switch on the Code
Username: Password: Register - Forgot Password Home Tutorials Forums News & Other Posts Podcast About Us Contact Us Tutorials .NET C# Snippet ...

VisualBuilder is a developer and programming site providing Tutorials, Articles, Source Code, Components, Answers, Books for Java, .NET, Web ...

Resources last updated: 11/29/2015 8:50:44 PM