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

InitiateAjaxRequest multiple uses

5 Answers 108 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Rich
Top achievements
Rank 1
Rich asked on 25 May 2010, 02:55 PM
Hi All,

I am using RadAjaxManager and initiateAjaxRequest for multiple scenarios on a single page.

In my code behind RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) method i parse the argument to handle the correct request using a switch statement.

What i'd like to do is be able to control the loading panels for different controls on my page based on the actual request..

1. Is my approach correct?? using  a single initiateAjaxRequest to handle different ajax requests?? Is there a different way?

2. How can i use a loading panel over different controls based on different requests??

3. Is this truly the only way to do this? I cannot directly ajaxify buttons/links etc as i am initiating these calls upon the closing of radwindows in the parent page.

Please help. Thanks!

5 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 28 May 2010, 01:22 PM
Hi Rich,

Using a single initiateAjaxRequest to handle different ajax requests is correct approach for achieving your goals. Actually this is single request which tales different arguments.
Regarding the LoadingPanel settings you could review the following help topics which elaborates on this matter:

http://www.telerik.com/help/aspnet-ajax/ajxshowloadingpanelnexttoajaxinitiator.html
http://www.telerik.com/help/aspnet-ajax/ajxcenterloadingpanel.html



Regards,
Maria Ilieva
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.
0
Rich
Top achievements
Rank 1
answered on 28 May 2010, 03:04 PM
Thanks for the reply. These examples show me how to position the loading panel. Which isn't really the problem.. But helps a bit.

Scenario is as follows:

1. Buttons inside rows of a repeater call JS to open a RadWindow
2. When the RadWindow is closed InitiateAjaxRequest is called,
3. At this time a loading panel should be displayed OVER the repeater,
4. When a response is returned the loading Panel should be removed/hidden


Another scenario in the same page works as follows:

1. ImageButton inside repeater rows makes postback, repeater has ajax setting.. ajax works. but no loading panel is displayed. Also i am unable to dynamically add ajaxsettings to these buttons because of this problem:

http://www.telerik.com/community/forums/aspnet-ajax/ajax/ajaxify-specific-controls-dynamically-argumentnullexception-no-page-parameter.aspx

Which your reply does not help me with.

Thanks for you help.










0
Maria Ilieva
Telerik team
answered on 31 May 2010, 03:21 PM
Hi Rich,

Please review my answer in the other post you have opened with us


Greetings,
Maria Ilieva
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.
0
Rich
Top achievements
Rank 1
answered on 02 Jun 2010, 10:54 PM
Hi There,

i am using this same scenario again in another app and have a new issue.

The arguments i am passing to the RadAjaxManager1_AjaxRequest( method are objects.. and obviously since i can only use one ajaxrequest per page it is receiving all my requests. The objects i am passing are more complex and i now need to deserialize these on the other side.. but since i only have one method i cannot know what type to deserialize the object to.

Do you have any suggestions?? is there some other property i can use in the sender or AjaxRequestEventArgs to help identify the type of object i need to deserialize the argument to??

thanks!
0
Maria Ilieva
Telerik team
answered on 09 Jun 2010, 01:47 PM
Hi Rich,

We do not have universal way for deserializing. The way you will deserialized the object depends on your second argument and the value you pass. There is not other property you could use. If the provided property does not cover the required functionality you could use the page ViewState for this purpose.


Sincerely yours,
Maria Ilieva
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
Rich
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Rich
Top achievements
Rank 1
Share this question
or