This is a migrated thread and some comments may be shown as answers.

Pop-up edit form - how to resize window on the client side

2 Answers 335 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 17 Nov 2010, 03:56 PM

Hello!
I ran into a problem that when the content inside edit form (pop-up window) of a grid is changing due some user actions (client-side), the pop-up window container keeps the same size. For example, if I use multipageview and tabstrip inside pop-up window, and content of the default tab has smaller height, than on other pages, when user switches tabs, the larger content goes out off the window.
Any chance I can manually resize the window ?

 

Thanks in advance!

Andy.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 18 Nov 2010, 06:50 AM
Hello,


I found a documentation on how to center edit-form pop-up from client side. This would help you in accessing pop-up and setting the size.
Center PopUp edit form in RadGrid


-Shinu.
0
Andy
Top achievements
Rank 1
answered on 18 Nov 2010, 12:42 PM
Hi Shinu!
Thanx for the tip, that really helped.
Here's my solution in case anybody will need it:
var popUp;
  
//capture popUp window reference to the global variable.
function PopUpShowing(sender, eventArgs){
  popUp = eventArgs.get_popUp();
}
  
//adjusts popUp height to the height of a DOM element, passed as parameter
function adjustDialogSize(pageView) {
 var height = pageView.offsetHeight + pageView.offsetTop + 55;
 popUp.style.height = height + "px";
}
  
//handler for OnClientTabSelected event of RadTabStrip
function onClientTabSelected(sender, eventArgs) {
 var el = eventArgs.get_tab().get_pageView().get_element();
 adjustDialogSize(el);
}
Tags
Grid
Asked by
Andy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Andy
Top achievements
Rank 1
Share this question
or