This is a migrated thread and some comments may be shown as answers.

How can I close RadAjaxLoadingPanel from code behind ?

2 Answers 203 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 20 Feb 2012, 02:19 PM
Hi, I have a RadAjaxLoadingPanel which automatically fires when my radgrid needs a data source. Great.
However, in my NeedDataSource event, I have a condition set to tell the code that it might not need to rebind.

If multiviewContacts.GetActiveView.ID = "viewContactSelect" Then
     'Bind the radgrid
else
    'Don't bother binding
end if

When my code doesn't need to rebind, the Loading Panel remains on the screen.

Surely, there must be a simple way of removing the loading panel from server side, code-behind.  I just can't find it !


I've looked at the demo http://www.telerik.com/help/aspnet-ajax/ajax-show-hide-loadingpanel.html but I don't want to have to add 25 more lines of javascript to my page just to hide the loading panel.

...and even then - I have the issue of calling that javascript from the code behind.


Cheers,
Scott

2 Answers, 1 is accepted

Sort by
0
Scott
Top achievements
Rank 1
answered on 22 Feb 2012, 12:04 PM
Bumpy bumpy !

I'd really appreciate an admin's input on this if possible.

0
Tsvetina
Telerik team
answered on 23 Feb 2012, 11:57 AM
Hi Scott,

Note that the appearance and hiding of the loading panel is handled entirely on the client. It would not hide only in case the request that it was shown for did not end successfully. Therefore, my advice is to check in Firebug or IE Developer toolbar whether the request to the server ends successfully and also if there are any client-side errors.
In a correctly working scenario there would be no need to explicitly hide the loading panel if it was shown by an ajax setting.

Regards,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Ajax
Asked by
Scott
Top achievements
Rank 1
Answers by
Scott
Top achievements
Rank 1
Tsvetina
Telerik team
Share this question
or