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

Weird position for RadDateTimePicker pop-up on RadWindow

2 Answers 136 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 2
Sean asked on 22 Mar 2011, 09:09 PM
Hi all,

I have a RadDateTimePicker inside of a RadWindow which has smallish dimensions (400x500 pixels). I would like the pop-up to appear inside of this window, but instead it appears partially off-screen and causes weird resizing issues. How can I achieve this?

EnableScreenBoundaryDetection is set to true.
I tried playing around with the pop-up direction but didn't see what I wanted. It is currently set to upper-right.

Before/After shots attached.

Thanks for your help.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 23 Mar 2011, 07:01 AM
Hello Sean,

The RadWindow control is basically an IFRAME and you cannot have DHTML elements lay above that IFRAME. One suggestion is to try the approach used in this demo. There using the OnPopupOpening and OnPopupClosing event handlers of the RadDatePicker control and call the autoSize() method of the window object with a small timeout.

Or if you don't want a fixed width window, you can set the window property AutoSize to True, which will automatically resize the window according to its content page

If you want to show the RadDateTimePicker above the RadWindow ,Then better approach is to use window with ContentTemplate as shown in the demo below:
Window  / Use as controls container
This will allow the datepicker to show outside the RadWindow boundaries since it will be on the same page.

Now your window will be like
<telerik:RadWindow  ID="UserListDialog"  runat="server"  >
           <ContentTemplate>
               <telerik:RadDatePicker ID=picker runat=server></telerik:RadDatePicker>

Thanks,
Shinu.
0
Sean
Top achievements
Rank 2
answered on 23 Mar 2011, 11:20 PM
Hi Shinu,

Thanks for your quick response.

I am happy with the solution provided in the demo. I also applied HTML css overflow-y: hidden; so that the scrollbars don't show up when it is auto-resizing.

Thanks

EDIT: Actually, I found one problem: Once the pane has resized properly if I lose focus on the DatePicker it doesn't resize again. Why doesn't this trigger the OnPopupClosing event?
Tags
Window
Asked by
Sean
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Sean
Top achievements
Rank 2
Share this question
or