Wednesday, August 18, 2010

How to refresh entire page after gridview is updated?

when i updated a row in gridview, or delete a row from gridview, onli the gridview is updated. however any codes outside of gridview will not be refreshed.





lets say i have a gridview with productname, price,etc





and a label that displays the Total sum of everything thats in the cart, calling on the method Total()





however whenever i update or delete something from gridview, only gridview changes. the total only changes once i REFRESH that page manually myself. how do i enable the page to do a refresh whenever a change is done to gridview?How to refresh entire page after gridview is updated?
Encapsulate the logic that refreshes them in functions. Obviously the code that refreshes them is there in your code, but its not being called after you update your GridView.





After updating your Gridview, call the functions that refresh the controls in the page which you wish to refresh.





Hope this helps.How to refresh entire page after gridview is updated?
What program are you in?
  • web hosting talk
  • loan
  • No comments:

    Post a Comment