Solved

Update not refreshing Gridview

Posted on 2016-08-01
3
56 Views
Last Modified: 2016-08-18
I have a gridview user control on a page. On the page the control is on, I wrapped an UpdatePanel around the gridview with UpdateMode="Conditional" ChildrenAsTriggers="true" and my Trigger is a click of a DataList that does a populate of the gridview.

I also  have an Edit Button and when I click it the row goes into EditMode (EditIndex = e.NewIndex) and when I update a field and click Save the RowUpdating event fires, I update my table and I set the EditIndex = -1 but this does not populate with new values, only the old values.

I have tried to do a DataBind after the setting of the EditIndex = -1 but it does not help. I also tried to DataBind on the RowUpdated event but that didnt work either?

Any help would be appreciated and I have put the code below...
0
Comment
Question by:jknj72
3 Comments
 
LVL 50

Accepted Solution

by:
Ryan Chong earned 500 total points
ID: 41738450
what's the Data Source of your GridView? before you DataBind it, you probably need to refresh the Data Source as well.
0
 
LVL 8

Expert Comment

by:Prakash Samariya
ID: 41738783
Can you please provide bit of code to check with it?
0
 

Author Closing Comment

by:jknj72
ID: 41761244
thanks
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question