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

Dynamically loaded user control not showing Loading Panel

1 Answer 139 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
sayak
Top achievements
Rank 1
sayak asked on 21 Sep 2010, 06:11 PM
Hi,
   Telerik ver: 2009 Q2 and asp.net 3.5
I have a web form which has a radajaxpanel and script manager. I load a different usercontrol dynamically based on user selection on this webform.

The usercontrol has a combobox which updates a rad grid in the user control. I also have a radajaxmanagerproxy on this page.
When item is changed in rad combobox, the grid updates, but loading panel is NOT fired.

I tried this in the uuercontrol:

 RadComboBox1.PreRender += new EventHandler(RadComboBox1_PreRender);  // in page load

 void RadComboBox1_PreRender(object sender, EventArgs e)
        {

            RadAjaxLoadingPanel ajaxLoadingPanel = (RadAjaxLoadingPanel)Parent.FindControl("RadAjaxLoadingPanel1");
            RadAjaxManager.GetCurrent(this.Page).AjaxSettings.AddAjaxSetting(RadComboBox1, RadGrid1, ajaxLoadingPanel);


        } 



Please advice.

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 22 Sep 2010, 01:40 PM
Hello Sayak,

To implement your scenario you should dynamically add the AJAX settings for ajaxifying the UserControl. You should always do this in a Page event handler, which is executed each time during the page lifecycle (Page_Load, Page_PreRender) so that the control could be ajaxified when the page is initially loaded.

For more information on how this can be done, please take a look at the last section of the RadAjax and WebUserControls help topic.

All the best,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Ajax
Asked by
sayak
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or