Hello,
I am having a requirement where I have to increase the popupcontrol based on the content. Baasically I am loading a user control dynamically to aspxpopupcontrol. The user control has callbackpanel where the content is rendered based on the radio button which is also part of user control. The need is here to dynamically increase the widith and height of aspxpopupcontrol. I am able to resize and it works in all desktop to specified size based on selected radio button. Below I ahve given the piece of js code that does this.
function SetPopupSize(sender, height, width) {
var popupWidth, popupHeight;
// popupWidth = window.parent.document.documentElement.clientWidth * (width / 100);
// popupHeight = window.parent.document.documentElement.clientHeight * (height / 100);
popupWidth = screen.width * (width / 100);
popupHeight = screen.height * (height / 100);
sender.SetSize(popupWidth, popupHeight);
sender.UpdatePosition();
I have commented two lines which is also working. But it works different in laptop and small screens. so tired the screen.height and width to set the size. It renderes fine in all desktop screen. But I am getting vertical scroll bar mostly and sometimes getting horizontal scroll bar in laptop screens. What I have to do to make it consistent based on screen resolution. Please let me know regardign this.
Regards,
Elango
}
We have closed this ticket because another page addresses its subject:
Documentation - Update the ASPxPopupControl / ASPxDockPanel topic - Add information about using Percentage for dimensions
Hi Elango,
You can determine the client's screen resolution using the approach provided in the following article: Screen Resolution Detection. Then set the size of your ASPxPopupControl based on the obtained values.
With best regards,
Ivan N.
Fixed it by dynamically finding the screen size and resizing the popup window.