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

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

7 Answers 334 Views
Window
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 20 Feb 2008, 06:54 PM
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!

7 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 21 Feb 2008, 01:15 PM
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
0
Michael
Top achievements
Rank 1
answered on 21 Feb 2008, 01:45 PM
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-)
0
R
Top achievements
Rank 1
answered on 02 Aug 2018, 12:17 PM

hi 

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

0
R
Top achievements
Rank 1
answered on 02 Aug 2018, 12:19 PM
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.
0
Rumen
Telerik team
answered on 07 Aug 2018, 10:23 AM
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.
0
R
Top achievements
Rank 1
answered on 09 Aug 2018, 05:45 AM

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.

0
Rumen
Telerik team
answered on 09 Aug 2018, 06:33 AM
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.
Tags
Window
Asked by
Michael
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Michael
Top achievements
Rank 1
R
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or