Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Refresh Issue using AJAX TabPanels

Posted on 2008-10-21
6
Medium Priority
?
611 Views
Last Modified: 2012-05-05
I have a set of 4 AJAX TabPanels, each with a nested UpdatePanel and GridView. My grids have buttons in them that fire off add/update/delete stored procedures.

When deleting an item from Grid 1(Tab 1), I need to refresh Grid 3 (also on Tab3) as Grid 3 will now have different results (Grid 1 has users, grid 3 has tasks - when you remove a user, you remove the connection to a task for that user).

When I click the Delete button on my grid, the stored procedure runs correctly, and Grid 1 refreshes correctly, showing that user has been deleted.  However Tab 3, Grid 3 does not refresh.

At first, I thought it might be because I wasn't telling it to refresh. So I put in a call: UpdatePanel3.Update(); This does nothing. I'm at a loss here.
0
Comment
Question by:Paul Kahl
  • 3
  • 3
6 Comments
 
LVL 10

Accepted Solution

by:
GeoffSutton earned 2000 total points
ID: 22771306
Instead of updatepanel3.update() try Grid3.databind() - You are refreshing the data on the grid, from the datasource.  That will work if you are using a datasource control.  if you are manually binding to a datatable, you will need to make the row as deleted in the datatable before rebindng it.

Hope this helps,

Geoff
0
 
LVL 3

Author Comment

by:Paul Kahl
ID: 22771435
You're right. I figured it out about 2 seconds after I made the post. I already have a function that does the grid3.bind, so I just called that function, and then the update:

fetchReportTypeListings();
UpdatePanel3.Update();

Worked fantastic. Thanks for confirming that as the correct methodology.
0
 
LVL 10

Expert Comment

by:GeoffSutton
ID: 22771512
Excellent.  I'm glad you figured it out so quickly.

Geoff
0
Industry Leaders: 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!

 
LVL 3

Author Comment

by:Paul Kahl
ID: 22771564
I was pretty sure I had it, but I'm glad you backed me up with your answer, or I'd have debated it well into next week. :)
0
 
LVL 10

Expert Comment

by:GeoffSutton
ID: 22771627
LOL I can understand that sort of thing.  A good rule of thumb that I always follow:  If it works, and it's not the "Correct" way of doing it, who cares so long as it doesn't throw errors under load testing :)

Geoff
0
 
LVL 3

Author Comment

by:Paul Kahl
ID: 22771991
Totally agree - most of my .Net code isn't "The Correct Way". But 9 times out of 10, it's the right way, and the best practice way. Thanks again.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

This article discusses how to implement server side field validation and display customized error messages to the client.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

926 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