Solved

Update not refreshing Gridview

Posted on 2016-08-01
3
44 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 49

Accepted Solution

by:
Ryan Chong earned 500 total points
Comment Utility
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
Comment Utility
Can you please provide bit of code to check with it?
0
 

Author Closing Comment

by:jknj72
Comment Utility
thanks
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
.Net Web Site Password specs 2 19
Round up to 100% in .NET 10 39
Asp.net mvc 5 5 13
Copy/Clone an object. 9 10
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now