question about updating a row? How to update a different row.

I will try to make this as simple as I can.  k, here I go.  I originally populate my datagrid with data.  Then during the edit mode, I can populate information by an ontextchanged event, which is actually bringing in a new row (essentially).  My problem occurs when I try to update the data.  Since the row was originally populated with the data, it updates that row in the table.  But since I did an ontextchanged, I want to update that row instead.  Not the original row.  If I do an update, then I have two identical rows of data in my table, but with different primary keys.  How can I update the second row instead of the original row?  I appreciate your input and i am humbly thankful!
Jake
0
jakvike
1/12/2004 7:10:52 AM
asp.net.object-datasource 16182 articles. 0 followers. Follow

0 Replies
777 Views

Similar Articles

[PageSpeed] 34

Reply:

Similar Artilces:

Row updating, row updated confusion
Okay this is the first time I've ever had to do code behind for row updating logic in a gridview. So be patient with me if it's totally incorrect. Do I put the gridview rebind code in the Row Updating or Updated event?  Currently, I have it in both as I'm simply troubleshooting to try to get it to work.  With this code, not only is the record not updating but the record disappears from the gridview upon refreshing.Protected Sub GridView2_RowUpdated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdatedEventArgs) Handles GridView2.RowUpdated ...

warning: update row ... is a conflict update and this row is ignored
SQL Anywhere 10.0.1.3488 I am synching one SQL Anywhere database to another through MobiLink, getting this warning: W. 2008-08-19 13:01:01. <17> [10037] Ignoring updated row (new values) W. 2008-08-19 13:01:01. <17> [10038] Ignoring updated row (old values) W. 2008-08-19 13:01:01. <17> [10072] The update row for table '<orders>' is a conflict update and this row is ignored. There are currently no conflict resolution scripts in place, so I would expect the default behavior of "last one in wins" rather than seeing "this row is ign...

update multi row when i meant update single row
RGVhciBhbGw6DQoNCkkgdHJpZWQgdG8gdXBkYXRlIGEgc2luZ2xlIHJvdyBmb3IgdGhlIGRh dGFiYXNlLCBob3dldmVyLCB0aGUgcXVlcnkgaGVyZQ0KdXBkYXRlIG11bHRpcGxlIHJvd3MN Cg0KbXkgJHNxbCA9ICJVUERBVEUgdXB0aW1lIFNFVCB1cF90aW1lPSRuZXdfdXB0aW1lDQog ICAgICAgICAgICAgV0hFUkUgaG9zdG5hbWUgPSAnJGhvc3QnIGFuZA0KICAgICAgICAgICAg IHN0YXJ0ZGF0ZT0gKHNlbGVjdCBNQVgoc3RhcnRkYXRlKSBmcm9tIHVwdGltZSB3aGVyZQ0K ICAgICAgICAgICAgIGhvc3RuYW1lID0nJGhvc3QnIGFuZCB1cF90aW1lID0gJG9sZHVwdGlt ZSkgIjsNCg0KSSBtZWFudCBvbmx5IHdhbnQgdG8gdXBkYXRlIGxhdGVzdCBzdGFydGRhdGUs IHNvbWVob3csIGl0IHJldHVybnMgYWxsDQp0aGUgc3RhcnRkYXRlIHdoaWNoIHVwX3RpbWUg PSRvbGR1...

how to update a row using a seperate update button not command button without selecting the row?
How to update a row using a seperate update button not command button without selecting a row? Simple question but dificult to do. The reason I ask this is that when a user clicks 'Update' I want each row to update the database. Please note I can't use findcontrol as their are no headers This is my code so far: protected void UpdateButton_Click(object sender, EventArgs e){    foreach (GridViewRow row in CellGridView.Rows)     {          string stext = CellGridView.Rows.ToString();     &nb...

DataSet rows being deleted, but after the update , the sql database is not updated. The delete rows still in the database.
 Stepping thru the code with the debugger shows the dataset rows being deleted.   After executing the code, and getting to the page presentation. Then I stop the debug and start the page creation process again ( Page_Load ).    The database still has the original deleted dataset rows. Adding rows works, then updating works fine, but deleting rows, does not seem to work.   The dataset is configured to send the DataSet updates to the database. Use the standard wizard to create the dataSet.     cDependChildTA.Fill(cDependChildDs._ClientDependentC...

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
Holy Crap, Batman! You'd think I was running Windows XP and it's patch Tuesday. So far this week - new kernel (2.6.27.10), 2 new browsers (Opera 9.63 and Firefox 3.05) and a new plugin (Flash 10.0.156.3). 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.6.27.10), 2 new browsers (Opera 9.63 > and Firefox 3.05) and a new plugin (Flash 10.0.156.3). I'm about ready > to try one od the BSD's! I take ...

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'...

Updating only updated DataGrid rows
I have a gridview control that I have  swapped out the lable controls for textbox controls. What i want to do is code a save button to iterate through the rows and at any row where the value has been changed, run a sql update. I have the sql, I have the grid view, but i dont have the iteration code. (im using c#)psudo code:  while(gridview.rows.morerows()=true (or somthignlike that))if(row.current row.update = true ){do sql update here}nextRow Any hints are greately appreciated Dan    foreach (GridViewRow row in GridView1.Rows) { // You hav...

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...

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:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2 ...

Updating DataList Row by Row
Hello, I have a datalist on my web page which displays a list of records from my database, all the information is displayed in labels except for one which is in a DropDownBox and the user can select Yes or No.  I want to update each record individual based on the value in the dropdownbox.  My problem is currently if I change the last record to say No then all the records in the db change to No.  It is not recording the new values row by row. Anybody got ideas why? ThanksRegards,Steven I don't think is the DataList because I used in that way myself many times Post som...

Update Command Updates All Rows
I have a gridview update issue. I want to update just two fields "Email" and "IsLockedOut". However, when I press update all the rows are updated with the same information. I would like just the row that was in edit mode to be updated. My code is as follows:<asp:SqlDataSource ID="dbAdmin" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM [vw_aspnet_MembershipUsers] ORDER BY [UserName]" OnSelecting="dbAdmin_Selecting" UpdateCommand="UPDATE as...

(Fwd) How to loop through a database, row by row, and select and update one row at a time
----- Forwarded message from Troy Mulder <mulderta@gmail.com> ----- Date: Mon, 12 Apr 2010 17:48:37 -0400 From: Troy Mulder <mulderta@gmail.com> To: Tim.Bunce@pobox.com Subject: How to loop through a database, row by row, and select and update one row at a time Hello Tim (is it Dr. Bunce?), My name is Troy Mulder, and I am trying to get a perl script to interface with a PostgreSQL database. I am trying to step through each row of the database, and read one column of the row, and update another column of the row. When I follow the online tutorial a...

Web resources about - question about updating a row? How to update a different row. - asp.net.object-datasource

Sick Of ‘Star Wars: The Force Awakens’ Spoilers? A New Chrome Extension Will Block Them For You
With the release of Star Wars: The Force Awakens nearly upon us, speculation regarding the film has reached a fever pitch. Fans who wish to avoid ...

You Guys, Trump Claims He Was Just Mocking Reporter’s Journalism, Not His Disability
Donald Trump , the presidential hopeful who believes himself so high and mighty he can’t possibly he wrong , is now claiming that he has no idea ...

Another White House Fence Jumper, This Time Caught On Camera
The additional security measures that the Secret Service has put in place didn’t stop a man from making a jump over the White House fence yesterday: ...

Kremlin says Turkey's Erdogan requests meeting with Putin in Paris
Reuters Kremlin says Turkey's Erdogan requests meeting with Putin in Paris Reuters MOSCOW Russia said on Friday that Turkish President Tayyip ...

French fly flags from windows for Paris victims in rare patriotic display
Windows in apartments, office buildings and corner cafes were draped with the French flag on Friday in a rare display of patriotism as France ...

Big Balloons, Heavy Security for NYC Thanksgiving Parade
Big balloons, heavy security for NYC Thanksgiving parade; St.

Similarities to Jim Jones and the Cult of Climate Change
Guest opinion by Arkady Bukh, Esq The apocalypse of an alleged climate change shares many of Jones’ cult-like qualities. Jim Jones, the People’s ...

Sony Working on App to Stream PS4 Games on Mac and PC
Sony executive Shuhei Yoshida has announced on Twitter that the company is working on an official Remote Play app for Mac and PC, enabling users ...

LG to build a new OLED plant for more than $8.71 billion
In the past couple of years, we've constantly seen launches of OLED TVs with amazing picture quality, but high prices kept their sales way below ...

Francois Hollande’s Quest For A United Front Against ISIS May Be Doomed To Fail
While Americans celebrated Thanksgiving, French President Francois Hollande, who visited the United States to talk to President Obama on Tuesday ...

Resources last updated: 11/27/2015 2:13:03 PM