博客园  :: 首页  :: 联系 :: 管理

ASPxGridView 和 AJAX Extensions ToolBox 不兼容

Posted on 2010-05-09 18:36  sunrack  阅读(359)  评论(0编辑  收藏  举报

http://www.devexpress.com/Support/Center/p/Q91789.aspx

 

Created by Herbert Illedits at 2007/12/11 14:44:46
Attachment: WebApplication1.zip (211136 bytes)

When I create a page using the 'CallbackPanel' controll and into the CallbackPanel the MS AJAX Toolkit CollapsiblePanel Extender, I get the following error on Callback.

Extender control 'CollapsiblePanelExtender1' is not a registered extender control. Extender controls must be registered using RegisterExtenderControl() before calling RegisterScriptDescriptors(). Parametername: extenderControl

Can you help me what's wrong?

Reviewed by DevExpress Team at 2007/12/12 8:49:53

Processed (Answered) by DevExpress Team at 2007/12/12 10:36:00

Hi Herbert,

The problem appears because the extender control should register its scripts within the Prerender event. When you call the PerformCallback method, the Callback event is generated, but the PreRender event is not generated in this case (this is one of the difference between a post back and call back). So, the problem appears.

Thanks,
Plato

Reactivated by Herbert Illedits at 2007/12/12 14:04:43

Hi Plato,

thank you for your answer, but I don't know what I have to do, to fix this problem. Have you some example for me how to handle this problem?

Thanks,
Herbert

Processed (Answered) by DevExpress Team at 2007/12/12 21:46:45

Hi Herbert,

To find a solution for your task ,we first need to know what you are trying to achieve. Please detail that, and we will try to help you.

Thanks,
Plato

Reactivated by Herbert Illedits at 2007/12/13 7:57:52

Hallo Plato,

I want to create a UserControl who includs the MS AJAX Toolkit CollapsiblePanel Extender, this works fine if i do not use it in a CallbackPanel. But at the time i use it into the CallbackPanel I get the error descriped above.

Herbert

Updated by DevExpress Team at 2007/12/17 22:51:49

Hi Herbert,

We are working on this question and will post a solution here once we find it. Please bear with us.

Thanks,
Plato

Processed (Answered) by DevExpress Team at 2007/12/28 14:56:51

Hi Herbert,

First, I apologize for the delay in responding. It took us some time to examine this problem.

However, as we found, extenders are incompatible with controls that update their content using the callback technology. As we stated previously, due to the extenders' specificity, they should be registered when both OnPreRender and OnRender events are processed. But, the OnPrerender isn't triggered when a control is updated via a callback. That's why the problem occurs.

A possible solution is to move the extender outside the CallbackPanel, so that it isn't updated when processing a callback. But, the extender will not be able to find its target control by the TargetControlID, because in this situation, they will be placed on different hierarchy levels. You'll have to write a custom ControlID resolver to process this situation (handle its ResolveControlID event). Another problem with this solution is that all custom client properties assigned to the control by the extender will be lost once the control is updated via a callback. It looks as if the only way to overcome this is to manually save/restore the required settings.

So, it appears that there is no easy way to resolve this incompatibility problem. We apologize for any inconvenience.

Thanks,
Vito