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

How can we open raddatepicker popup window up the Radwindow popup

5 Answers 349 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Jagz W
Top achievements
Rank 2
Jagz W asked on 13 May 2013, 05:49 AM

I have raddatepicker control in radwindow.The size of radwindow is fixed. when i open the raddatepicker popup it shows scroll bar in radwindow due to less space.

I don't want to show the scroll bar. so my question is Can we open the datepicker popup upon the radwindow.

I have attached the screen shot.

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 May 2013, 06:52 AM
Hi Jagz W,

Please have a look at the sample code I tried to display the calendar popup on opening the RadWindow which works fine at my end. Also you need to explicitly close the calendar popup on closing the RadWindow since the popup wont close automatically on closing the RadWindow.

ASPX:
<telerik:RadButton ID="RadButton1" runat="server" AutoPostBack="false" Text="Open RadWindow"
    OnClientClicked="OnClientClicked">
</telerik:RadButton>
<telerik:RadWindow ID="RadWindow1" runat="server" OnClientShow="OnClientShow" OnClientBeforeClose="OnClientBeforeClose">
    <ContentTemplate>
        <telerik:RadDatePicker ID="RadDatePicker1" runat="server">
        </telerik:RadDatePicker>
    </ContentTemplate>
</telerik:RadWindow>

JavaScript:
<script type="text/javascript">
    function OnClientShow(sender, args) {
        var datePicker1 = $find('<%=RadDatePicker1.ClientID %>');
        datePicker1.showPopup();
    }
    function OnClientClicked(sender, args) {
        var RadWindow1 = $find('<%=RadWindow1.ClientID %>');
        RadWindow1.show();
    }
    function OnClientBeforeClose(sender, args) {
        var datePicker1 = $find('<%=RadDatePicker1.ClientID %>');
        datePicker1.hidePopup();
    }
</script>

Thanks,
Shinu.
0
Jagz W
Top achievements
Rank 2
answered on 13 May 2013, 09:12 AM
Hi,

Thanks for reply. I think you din't get my question. Please check the attached screen shot for better understanding.

my question is: I want to remove the scroll bar of radwindow popup that occurred due to raddatepicker popup.


Thanks,
Jagz W
0
Shinu
Top achievements
Rank 2
answered on 14 May 2013, 04:03 AM
Hi Jagz W,

One suggestion is, instead of setting a fixed size for the RadWindow, you can use the AutoSize property of the RadWindow so that it will resize itself according to the size of the content page. If the content page's dimensions are bigger than the parent one's, RadWindow will fill the browser and render scrollbars for viewing the rest of the content page. Please have a look at this demo on Automatic Size Adjustment.

Thanks,
Shinu.
0
Jagz W
Top achievements
Rank 2
answered on 14 May 2013, 05:35 AM
Hi Shinu,

I don't want to show scroll bar.


Thanks,
0
Venelin
Telerik team
answered on 14 May 2013, 06:41 PM
Hello Jagz,

Could you please provide a sample code in which you get the scrollbars? It seems that an iframe is generated inside the RadWindow  and in this scenario the popup could not be positioned outside the RadWindow. You can use the approach in this demo in order to show the whole popup and hide the scrollbars.

Otherwise, in this very simple case

<telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true" AutoSize="false" Height="200px" >
    <ContentTemplate>
        <telerik:RadDatePicker ID="RadDatePicker1" runat="server" DateInput-Label="Label1">
        </telerik:RadDatePicker>
        <telerik:RadDatePicker ID="RadDatePicker2" runat="server" DateInput-Label="Label2">
        </telerik:RadDatePicker>
        <telerik:RadDatePicker ID="RadDatePicker3" runat="server" DateInput-Label="Label1">
        </telerik:RadDatePicker>
    </ContentTemplate>
</telerik:RadWindow>

the popup goes out from the window and overlaps as expected.

I hope this helps.

Kind regards,
Venelin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Calendar
Asked by
Jagz W
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Jagz W
Top achievements
Rank 2
Venelin
Telerik team
Share this question
or