Solved

Refresh Issue using AJAX TabPanels

Posted on 2008-10-21
6
562 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
Comment Utility
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
Comment Utility
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
Comment Utility
Excellent.  I'm glad you figured it out so quickly.

Geoff
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 3

Author Comment

by:Paul Kahl
Comment Utility
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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 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

9 Experts available now in Live!

Get 1:1 Help Now