Solved

Update not refreshing Gridview

Posted on 2016-08-01
3
73 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 52

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 10

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

615 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