Solved

Refresh Issue using AJAX TabPanels

Posted on 2008-10-21
6
592 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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
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

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

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

679 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