Solved

Refresh Issue using AJAX TabPanels

Posted on 2008-10-21
6
573 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 500 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
DevOps Toolchain Recommendations

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

 
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

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 HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

920 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

18 Experts available now in Live!

Get 1:1 Help Now