|
Article relates to
|
RadAjax v1.x
|
|
Created by
|
Steve
|
|
Last modified
|
March 07, 2008
|
|
Last modified by
|
Steve
|
HOW-TO
Update 3rd party controls which use client-side javascript code with Rad
ajax
DESCRIPTION
Basically you should check first if the control is Atlas compatible (Atlas is the MS framework for ajax-enabling controls).
SOLUTION
Technical difficulties may occur when updating 3rd party controls which use
javascript code on client- side outside of the updating area. As controls are not aware that they are being updated by Ajax (rather than a postback), they cannot restore their client-side functionality as the html element is being replaced by a new object. Things to look for:
- The control which is to be updated via ajax request should be aware of this fact. This means that it has to be modified to work with xmlhttp requests. This should be done by its vendor, so please contact the control's vendor for help on the issue.
NOTE: All RadControls have been modified and are ready to be used with Telerik's ajax controls (the first compatible version is RadControls Q2 2006)
- Make sure the control render in one tag. This will ensure its proper update. You can check that by viewing the page's source. If it does not render in one tag, you should nest it in a Panel or a div.
- Set EnableOutsideScripts property of the AjaxManager or AjaxPanel to true in order to properly restore the client-side javascripts in case they are outside of the updating area.
SOLUTION
Technical difficulties may occur when updating 3rd party controls which use
javascript code on client- side outside of the updating area.
As controls are not aware that they are being updated by Ajax (rather
than a postback), they cannot restore their client-side functionality
as the html element is being replaced by a new object. Things to look
for:
- The control which is to be updated via ajax request should
be aware of this fact. This means that it has to be pre-modified to
work with xmlhttp requests. This should be done by its vendor, so
please contact the control's vendor for help on the issue.
NOTE:
All RadControls are built on top of MS AJAX and are ready to be used with
Telerik's ajax controls.
- Rendering the control in one
tag is not mandatory here, as the updated control is wrapped in dynamically created UpdatePanel which takes care of that.
- In case the client-side javascript of the control is registered outside of the
updating area (or through Page.ClientScript... methods, you need to make sure the head tag is updated (EnablePageHeadUpdate="true") and register the latter scripts through the ScriptManager static methods:
ScriptManager.RegisterStartupScript() etc.
You can keep track on these articles in case we change the way it works:
Please
Sign In
to rate this article.