Velocity Reviews

Velocity Reviews (
-   ASP .Net Datagrid Control (
-   -   2.0 GridView Updates question. ( 04-19-2006 07:57 PM

2.0 GridView Updates question.
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.

All times are GMT. The time now is 04:55 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.