Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > 2.0 GridView Updates question.

Thread Tools

2.0 GridView Updates question.
Posts: n/a
I have used the datagrid in ASP.NET 1.x (VS 2003) and i was very
pleased with the edit/update/ and delete features of the

now it is changed to 'gridview' and i am having a lot of difficulty.

when i change the values as text, it does not remember the new value,
it is still looking at the old values.

name of my gridview = gridProgram

protected void gridProgram_rowUpdating(object sender,
GridViewUpdateEventArgs e)

the old style did not work:
GridViewRow tempRow = gridProgram.Rows[e.RowIndex];
TextBox tempTextBox =
((System.Web.UI.WebControls.TextBox)(tempRow.FindC ontrol("ID")));

DataControlFieldCell updateCell = gridProgram.Rows[e.RowIndex].Cells[2]
as DataControlFieldCell;
gridProgram.Columns[1].ExtractValuesFromCell(e.NewValues, updateCell,
DataControlRowState.Selected, true);

//also tried
//gridProgram.Columns[1].ExtractValuesFromCell(e.NewValues, updateCell,
DataControlRowState.Edit, true);

foreach (string strKeys in e.NewValues.Keys)
string strTestKeyValues = e.NewValues[strKeys].ToString();

right now, i should get only 1 value or 1 iteration and the
strTestKeyValues is remembering the old value as it came from the
database and not the changes i had made.

any idea will be greatly appreciated.

thanks and regards
Ravi Mahalingam
Fort Worth, TX.

Reply With Quote

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch updates with GridView McGeeky ASP .Net 6 05-11-2007 11:49 AM
GridView bound DataTable - how to get updates working? Tomasz Jastrzebski ASP .Net 4 12-08-2006 12:39 PM
GridView Passing Unchanged Data on Updates Rick ASP .Net 0 11-30-2006 12:41 AM
checking "Show Updates" doesn't reveal any Windows XP updates =?Utf-8?B?d2xzNTA4?= Windows 64bit 5 05-26-2006 04:42 PM
GridView Hierarchical View - Gridview in Gridview =?Utf-8?B?bWdvbnphbGVzMw==?= ASP .Net 1 05-09-2006 06:48 PM