ASPxClientPopupControl.UpdatePosition Method
Updates the default popup window’s position, to correctly align it at either the specified element, or the center of the browser’s window.
Declaration
UpdatePosition(): void
Remarks
The UpdatePosition method is in effect if the default popup window is aligned either at a specific element explicitly defined via the ASPxPopupControl.PopupElementID property or at the browser window’s center (the popup control’s ASPxPopupControl.PopupHorizontalAlign and ASPxPopupControl.PopupVerticalAlign properties are set to PopupHorizontalAlign.WindowCenter and PopupVerticalAlign.WindowCenter, respectively).
The UpdatePosition method allows you to correctly reposition the default popup window when the popup window (or the browser window) is automatically resized, without hiding it, to accommodate its changed content.
Example
...
function ShowPopup(userControlID) {
popup.SetHeaderText("UserCotnrol " + userControlID);
popup.SetContentHtml("Loading...");
popup.Show();
if (GetUserControlFromCache(userControlID) != null) {
// get UserControl content from cache
SetPopupContentHTML(GetUserControlFromCache(userControlID));
_aspxRunStartupScripts(); // internal function
}
else {
userControlIDInCallback = userControlID;
callback.SendCallback(userControlID);
}
}
function SetPopupContentHTML(result) {
popup.SetContentHTML(result);
if (popup.IsVisible())
popup.UpdatePosition();
}
...