How can we open raddatepicker popup window up the Radwindow popup

6 posts, 0 answers
  1. Jagz W
    Jagz W avatar
    17 posts
    Member since:
    Mar 2012

    Posted 13 May 2013 Link to this post

    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.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 May 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jagz W
    Jagz W avatar
    17 posts
    Member since:
    Mar 2012

    Posted 13 May 2013 Link to this post

    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
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 May 2013 Link to this post

    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.
  6. Jagz W
    Jagz W avatar
    17 posts
    Member since:
    Mar 2012

    Posted 14 May 2013 Link to this post

    Hi Shinu,

    I don't want to show scroll bar.


    Thanks,
  7. Venelin
    Admin
    Venelin avatar
    352 posts

    Posted 14 May 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017