Sign in to follow this  

[.net] get updated gridview values

This topic is 4275 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a gridview with an object array as its datasource. When I click on update the RowUpdating event fires fine. In the RowUpdating event, I need to get the new value but everything shows the old value, how do I get the updated value? please also note that the gridview is being built programatically as shown below. protected void PopulateFileGrid() { grdDocuments.Columns.Clear(); grdDocuments.DataSource = _article.DocumentArr; grdDocuments.AutoGenerateColumns = false; BoundField bndf = new BoundField(); bndf.DataField = "DocClientFilePath"; bndf.HeaderText = "File Name"; bndf.ReadOnly = true; grdDocuments.Columns.Add(bndf); BoundField bndf2 = new BoundField(); bndf2.DataField = "DocName"; bndf2.HeaderText = "Title"; grdDocuments.Columns.Add(bndf2); grdDocuments.EnableViewState = true; string[] dd = new string[1]; dd[0] = "DocID"; grdDocuments.DataKeyNames = dd; grdDocuments.AutoGenerateEditButton = true; grdDocuments.DataBind(); }

Share this post


Link to post
Share on other sites

This topic is 4275 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this