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

How to get DIV properties inside EditPopup

5 Answers 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John John
Top achievements
Rank 1
John John asked on 04 Mar 2010, 11:18 AM
Hi,
      I am using NestedGrid, i have parent grid and it has the nested grid that is child grid. Both grid has the functionality of editing with EditPopup window. I used the "PopUpShowing"  event commonly for both grid in order to place the Popup in center. I used the DIV elements to place and bind the controls inside the EditFormTemplate section

My question is when the PopUp is showing once edit button is clicked  I just want to get the DIV prperties of EditFormTemplate section of the corresponding PopUp window regardless parent or nested grid.

My purpose is the setting the PopUp height and width dynamically based on the container or DIV height and width. Because I already told the DIV used the place the controls, the DIV has its width and height property.So i just want to take this width and height values for dynamic operation

So is there any possible ways please let me know.

-Thanks in Advance

5 Answers, 1 is accepted

Sort by
0
John John
Top achievements
Rank 1
answered on 08 Mar 2010, 03:23 PM

Any suggessions to my question?
0
Veli
Telerik team
answered on 08 Mar 2010, 06:39 PM
Hi John,

In the OnPopupShowing client event handler, the event argument object's get_popUp() property getter returns the HTML DIV element that is the popup edit form.

Best wishes,
Veli
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
John John
Top achievements
Rank 1
answered on 09 Mar 2010, 11:33 AM
Hi Veli,
           Sorry i am not able to go through it, I could only get the  Popups default height and width. I am not getting your idea. If possible can u give me some sample of code.
 
My one of nested view's Popup DIV is given below;
<EditFormSettings EditFormType="Template" PopUpSettings-Modal="true" PopUpSettings-ScrollBars="Auto">  
                        <FormTemplate>                      
                                <div style="width:900px;height:500px"  id="divFirm" runat="server">  
                        //Controls section 

My edit form controls are placed under divFirm section. I also just want get the width(900px) and height(500px) of divFirm dynamically from PopUp event. So that only i can dynamiucally adjust the popup height and width as the scenario i menioned above question block

I hope now u are able to reach to my scenario

-Thanks
0
Accepted
Veli
Telerik team
answered on 09 Mar 2010, 01:09 PM
Hi John John,

So you have a custom panel in your form template and you need to find it on the client. You can find attached a small page I have created for your reference. I use RadGrid's client-side OnPopupShowing event to find my popup and then use $telerik.findElement() function to find the inner divFirm. Check it out.

Regards,
Veli
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
John John
Top achievements
Rank 1
answered on 09 Mar 2010, 04:12 PM
Hi Veli,
               Thats the trick, I will explore it.

-Thanks
Tags
Grid
Asked by
John John
Top achievements
Rank 1
Answers by
John John
Top achievements
Rank 1
Veli
Telerik team
Share this question
or