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

Show loading panel on tabclick for RadAjaxManagerProxy

3 Answers 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hrushikesh Mokashi
Top achievements
Rank 1
Hrushikesh Mokashi asked on 27 Aug 2008, 10:36 AM
Hi All,

I am using master/content page in my application.
In master page i added
 RadAjaxScriptmanager, RadAjaxManager, RadAjaxLoadingPanel

In content page i added RadAjaxManagerProxy .

1>In Content page i user RadTabStript,RadMultiPage.
2>In pageview i added Radgrid.

Issue 

1>On tab click i want to show loading panel on radgrid..
  
2>RadAjaxManagerProxy  does not support AjaxtRequest Method.
How can i add ajaxsetting from codebehind.

thanks
 

3 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 27 Aug 2008, 03:02 PM
Hello Hrushikesh Mokashi,

1. When ajaxifying your ContentPlaceHolder in the master page using RadAjaxManager, you can specify the RadAjaxLoadingPanelID for the content holder to use:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" > 
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="ContentPlaceHolder1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
</telerik:RadAjaxLoadingPanel> 

2. To add an AjaxRequest handler, you need to get the current AjaxRequestManager:

RadAjaxManager.GetCurrent(Page).AjaxRequest +=new RadAjaxControl.AjaxRequestDelegate(AllStringDataType_AjaxRequest); 

3. If we assume your RadAjaxManagerProxy has an ID="proxy", here is the code that needs to go in the Page_Load event of the page to add an ajax setting:

AjaxSetting setting = new AjaxSetting(); 
setting.AjaxControlID = "AjaxControlID"
 
AjaxUpdatedControl control = new AjaxUpdatedControl(); 
control.ControlID = "UpdatedControl"
 
setting.UpdatedControls.Add(control); 
proxy.AjaxSettings.Add(setting); 


Greetings,
Veli
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Hrushikesh Mokashi
Top achievements
Rank 1
answered on 28 Aug 2008, 05:38 AM

Hi,

Where should i add the handler   as

1>In master page i added the event as

 Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest

    End Sub

2>
In Page_load of content page i added handler as given below..

  
Dim manager As RadAjaxManager = RadAjaxManager.GetCurrent(Me.Page)
        AddHandler manager.AjaxRequest, AddressOf manager_AjaxRequest

----------

 Private Sub manager_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs)
        RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(Button2, Panel1)
    End Sub


but it never goto  manager_AjaxRequest  defination.
So where shoul i add the handler so it work.

Thanks





0
Veli
Telerik team
answered on 28 Aug 2008, 01:27 PM
Hi Hrushikesh Mokashi,

Let me comment on your suggestions.

1. AjaxRequest event handler always needs to be added in the page code-behind where the RadAjaxManager has been defined. So if your RadAjaxManager is defined in the master page, your AjaxRequest event handler needs to go in the master table's .cs file. I see you are using VB.net, therefore you can the first approach to simply handle your event with the specified sub-procedure.

2. I see that you are trying to add an ajax setting to your RadAjaxManagerProxy. Please note that this needs to be done in the Page_Load() event handler of the page, not in the AjaxRequest handler of the ajax manager. So, the scenario that should work is to add your AjaxRequest event handler in the master page's code-behind file, and add your ajax settings in the Page_Load event of the content page.

Best wishes,
Veli
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Hrushikesh Mokashi
Top achievements
Rank 1
Answers by
Veli
Telerik team
Hrushikesh Mokashi
Top achievements
Rank 1
Share this question
or