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

Fixed Size RadWindow with RadDatePicker

3 Answers 194 Views
Window
This is a migrated thread and some comments may be shown as answers.
Vic
Top achievements
Rank 1
Vic asked on 06 Sep 2009, 05:22 AM
I have a fixed size RadWindow opening as a modal popup window for my application.  Within this window I have multiple time/date pickers with some near the edge of the window, how can i make the calendar or time popup float above the window rather than make the window's scroll bars appear?  is it even possible since the window is an iFrame and the popups are within the frame?

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 07 Sep 2009, 08:09 AM
Hello Vic,

The RadWindow control is basically an IFRAME and you cannot have DHTML elements "bleed" trough that IFRAME. What I can suggest is to try the approach used in this demo. There we are using the OnPopupOpening and OnPopupClosing event handlers of the RadDatePicker control and call the autoSize() method of the window object with a small timeout.

I hope this helps.

Kind regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Vic
Top achievements
Rank 1
answered on 09 Sep 2009, 05:55 AM
I'd rather not expand the size of my window like that.  It is possible for me to fit the popup within the window, is there a way of intercepting the OnPopupOpening event to change the position of the control?  Perhaps to set it to the center of the window?  i have tried a few different methods but cannot get it to work with errors from recursion to it just not moving. 
0
Shinu
Top achievements
Rank 2
answered on 09 Sep 2009, 10:53 AM
Hello Vic,

It is possible to customize the pop-up calendar location of RadDatePicker by passing a pair of coordinates to the showPopup method that determines where the calendar will be displayed.

ASPX:
 
<telerik:RadDatePicker ID="RadDatePicker1" runat="server"
</telerik:RadDatePicker> 

C#:
 
protected void Page_Load(object sender, EventArgs e) 
RadDatePicker1.DatePopupButton.Attributes.Add("onclick""PopupLoc(event, '" + RadDatePicker1.ClientID + "');return false;");   

JavaScript:
 
<script type="text/javascript"
function PopupLoc(e, pickerID)   
{   
    datePicker = $find("<%= RadDatePicker1.ClientID %>");   
    datePicker.showPopup(10, 200);   // Set the position    
}   
</script> 
Also checkout the following demo for more information:
Calendar / Client-side API

-Shinu.
Tags
Window
Asked by
Vic
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Vic
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or