HighTechTalks DotNet Forums  

GridView, DataSource, RowUpdating, e.OldValues and e.NewValues collections

ASP.net Data Grid Control microsoft.public.dotnet.framework.aspnet.datagridcontrol


Discuss GridView, DataSource, RowUpdating, e.OldValues and e.NewValues collections in the ASP.net Data Grid Control forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Andrew Crawford
 
Posts: n/a

Default GridView, DataSource, RowUpdating, e.OldValues and e.NewValues collections - 09-12-2007 , 12:38 PM






Can anyone help please?
I am also returning old data in my new data field. I'm using VB (instead
of C#) I'm simply trying to post the updated data from one gridview
cell:

Am i missing something?

Protected Sub Race_GV_RowUpdating(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles
Race_GV.RowUpdating

Dim cell As DataControlFieldCell
cell = Race_GV.Rows(e.RowIndex).Cells(1)
Race_GV.Columns(0).ExtractValuesFromCell(e.Keys, cell,
DataControlRowState.Normal, True)
cell = Race_GV.Rows(e.RowIndex).Cells(2)
Race_GV.Columns(1).ExtractValuesFromCell(e.NewValu es, cell,
DataControlRowState.Edit, True)
Dim key As String
For Each key In e.Keys.Keys
Response.Write("<br/>old: " + key + ": " + e.Keys(key))
Next
For Each key In e.NewValues.Keys
Response.Write("<br/>new: " + key + ": " + e.NewValues(key))
Next

End Sub

Andy Crawford

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.