Skip to main content

ASPxClientScheduler.ChangePopupMenuContainer(container) Method

Changes the container that the ASPxScheduler pop-up menu belongs to.

Declaration

ChangePopupMenuContainer(
    container: any
): void

Parameters

Name Type Description
container any

An object that serves as the new container for the pop-up menu.

Remarks

If ASPxScheduler control is placed within a container control, there might be a situation where scheduler’s pop-up menus overlap the container borders (IE6 and IE7). When it happens, menus get clipped. A real situation - the ASPxScheduler inside the ASPxSplitter.

The ChangePopupMenuContainer method is implemented to overcome this obstacle. This method enables you to pull the menus out to the form’s level so they can be displayed intact. In this simple case, one line of code is enough:

ASPxScheduler1.ChangePopupMenuContainer(document.getElementById('form1'));

To restore the menu in its original container, call this method as follows:

ASPxScheduler1.ChangePopupMenuContainer(ASPxScheduler1);

In a situation where the ASPxScheduler is placed within the ASPxCallbackPanel, you have to put menu back in its original container before the ASPxClientCallbackPanel.PerformCallback is called. This is important, because menus are re-created when the Scheduler is reloaded after the callback. Then, the container is changed again to remove clipping. The following code snippet illustrates how to accomplish this task:

<dx:ASPxClientCallbackPanel ... ClientInstanceName="ASPxCallbackPanel1">
    <ClientSideEvents
        BeginCallback="function(s,e) {
            ASPxScheduler1.ChangePopupMenuContainer(ASPxScheduler1);
        }"
        EndCallback="function(s,e) {
            ASPxScheduler1.ChangePopupMenuContainer(document.getElementById('form1'));
        }" />

    <dxwschs:ASPxScheduler ID="ASPxScheduler2" runat="server">
    </dxwschs:ASPxScheduler>

</dx:ASPxClientCallbackPanel>
See Also