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

Display the loadingPanel on a User Control

1 Answer 36 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mak
Top achievements
Rank 1
Mak asked on 16 May 2013, 04:30 PM
Hi there,

we are updating one of our legacy features which involves 2 user controls and one 'client page' as follows:

User control 1 is a RadGrid containing items that are uploaded into the application and stored within the database.
User control 2 is a RadAsyncUpload control which is used to upload files into the database
The 'client page' holds both of these controls (along with all the navigation, bells and whistles, etc)

Currently, when an end-user uploads a file, a postback occurs and the new row appears on the grid. 

We then added a RadAjaxManager to the client page and then referenced the user control's through the code-behind (AddAjaxSettings) so that the upload to grid update process takes place on-the-fly without any disruption.

The technique used to do this is below:

Private attachmentsGrid as AttachmentsGrid = Me.Attachments1
Private uploadControl as UploadControl = Me.Upload1
 
RadAjaxManager1.AjaxSettings.AddAjaxSetting(attachmentsGrid, attachmentsGrid, LoadingPanel)
RadAjaxManager1.AjaxSettings.AddAjaxSetting(uploadControl.FindControl("uploadButton")
, uploadControl, LoadingPanel)
RadAjaxManager1.AjaxSettings.AddAjaxSetting(uploadControl.FindControl("uploadButton"), attachmentsGrid, LoadingPanel)

The above technique worked great, but we noticed that the LoadPanel was not appearing on any of the controls.

We then attempted to place a loading panel in each of the user controls and then referenced those controls (as our designated LoadingPanels) in the above AddAjaxSetting function but this also did not work.

Hope someone can assist!

Regards

A.

1 Answer, 1 is accepted

Sort by
0
Mak
Top achievements
Rank 1
answered on 17 May 2013, 09:18 AM
Just in case anyone else becomes stuck with this, the problem can be resolved by wrapping an ASP:Panel around the user controls and altering your AddAjaxSetting parameters to target the panel as opposed to the actual user controls.

Reference:

http://thaaraka.blogspot.co.uk/2010/12/display-radajaxloadingpanel-when-there.html

Regards

A.
Tags
Ajax
Asked by
Mak
Top achievements
Rank 1
Answers by
Mak
Top achievements
Rank 1
Share this question
or