Parent page automatically scrolls to top when opening rad window...

8 posts, 0 answers
  1. Michael
    Michael avatar
    5 posts
    Member since:
    Dec 2007

    Posted 20 Feb 2008 Link to this post

    Hello...I am using the latest build of Promethius controls. My problem is with the Rad window. I am generating a large page which loads variable numbers of images in various sections. These images are enclosed in links which invoke the RadWindow so that the images can be viewed in another image viewer control. That all works fine...However, as I mentioned, the page can be rather large, so for example if I scroll to the bottom of the page and click on one of those links, then the parent window scrolls automatically to the top before displaying the radwindow...worse yet, since the radwindow opens relative to where it was clicked, then the window is completely out of view and the user must scroll down to see the popup. The only thread I found that comes close to addressing this is http://www.telerik.com/community/forums/thread/b311D-bahgmt.aspx but did not solve my problem.
    This behavior is the same in IE, FF, and Safari.
    A temporary work around is to do a MoveTo and move the window to the top of the page, but I would prefer that the main page stay in place and the the window open where it was clicked...so that when the window is closed, the user doesnt have to scroll back down to where they were when they originally clicked on the link....make sense?
    Any help on this would be greatly appreaciated.

    Thanks!
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 21 Feb 2008 Link to this post

    Hello Michael,

    The problem discussed in the forum thread that you saw was fixed in the following update. I am not sure what the reason for the problem in your case might be, but if you open a support ticket and send us a sample project, we will check it right away.

    Please make sure that the project can be run locally and attach it to the support thread. Once we have a better view over your exact setup, we will do our best to help.


    Regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Michael
    Michael avatar
    5 posts
    Member since:
    Dec 2007

    Posted 21 Feb 2008 Link to this post

    Hello Georgi...I actually solved my own problem. While creating a sample project/page to send to you I realized that the anchor tag link that I was using to open the radwindow had a HREF="#" in it! Which of course would cause it to jump to the top of the page...
    Problem solved...my bad. 8-)
  4. R
    R avatar
    4 posts
    Member since:
    Feb 2016

    Posted 02 Aug 2018 in reply to Georgi Tunev Link to this post

    hi 

    iam showind radchart allong with table and in table tr radgrid is displayind radwindow so i need to export to pdf please help

  5. R
    R avatar
    4 posts
    Member since:
    Feb 2016

    Posted 02 Aug 2018 Link to this post

    hi 
    iam showing radchart along with table and in table tr radgrid is displaying in radwindow so i need to export to pdf please help me.
  6. Rumen
    Admin
    Rumen avatar
    13928 posts

    Posted 07 Aug 2018 Link to this post

    Hi R,

    You can use RadClientExportManager to export the contents of the page loaded in RadWindow. You can see how to configure the Client Export Manager in these demos: Export Whole Page and Export HTML Elements.

    Best regards,
    Rumen
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  7. R
    R avatar
    4 posts
    Member since:
    Feb 2016

    Posted 09 Aug 2018 in reply to Rumen Link to this post

    hi rumen,

    i need to export to pdf. radchart,html table,radgrid these all are in radwindow. how can i export from rad window and i am using above export  option what you sent.But radgrid data is breaking whenever the radgrid having more than  10 records.

  8. Rumen
    Admin
    Rumen avatar
    13928 posts

    Posted 09 Aug 2018 Link to this post

    Hi,

    The ClientExportManager can exports only the visible content on the page. 

    Similar results can be achieved with the Kendo Grid rather easily: http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/pdf-export/all-page-content-with-all-pages. Perhaps moving towards using the Kendo grid and the Kendo Drawing API directly will be suitable for you (the RadClientexportManager is a server wrapper over the Kendo Drawing API anyway).

    With the RadGrid for ASP.NET AJAX, however, such integration is not possible because the paging feature of RadGrid requires postbacks and this cannot work with the client-side PDF generation.

    I can make only one suggestion, but I cannot guarantee it will work as expected:

    Here is a small example that you can use as base and extend further to match your needs:

     

    <telerik:RadClientExportManager runat="server" ID="rcem1">
        <PdfSettings PageBreakSelector=".pBreak" />
    </telerik:RadClientExportManager>
    <asp:Button Text="export to pdf on pages" OnClientClick="exportToPdf(); return false;" runat="server" />
    <script>
        function exportToPdf() {
            var cem = $find("<%=rcem1.ClientID%>");
            cem.exportPDF($telerik.$("body"));
        }
    </script>
    <telerik:RadGrid runat="server" ID="rg1" PageSize="10" AllowPaging="true" OnNeedDataSource="rg1_NeedDataSource" OnItemDataBound="rg1_ItemDataBound"></telerik:RadGrid>

      

    Protected Sub rg1_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs)
        Dim tbl As New DataTable()
        tbl.Columns.Add(New DataColumn("id"GetType(Integer)))
        tbl.Columns.Add(New DataColumn("someColumn"GetType(Integer)))
        tbl.Columns.Add(New DataColumn("otherColumn"GetType(Integer)))
        For As Integer = 0 To 19
            tbl.Rows.Add(New Object() {i, i, i})
        Next
        TryCast(sender, RadGrid).DataSource = tbl
    End Sub
     
    Protected Sub rg1_ItemDataBound(sender As Object, e As GridItemEventArgs)
        If e.Item.ItemIndex Mod 3 = 0 Then
            'decide when to insert the page break class
            e.Item.CssClass += "pBreak"
            'restore row styling because setting a CssClass will remove the built-in class
            If e.Item.ItemIndex Mod 2 = 0 Then
                e.Item.CssClass += " rgRow"
            Else
                e.Item.CssClass += " rgAltRow"
            End If
        End If
    End Sub

    If this does not work for your scenario, the available options are:

    Best regards,

    Rumen
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top