Paging is Removed after Export

6 posts, 0 answers
  1. Brian
    Brian avatar
    9 posts
    Member since:
    Dec 2007

    Posted 05 Nov 2012 Link to this post

    We have a Grid with Export buttons.  The export functions as it should going to a new window.  When we click to go to another page on the grid it suddenly loses all paging, the command row, and even data in one of the columns.  It appears that when it exports it reformats the grid to remove paging and commands but then it doesn't enable the them again so when the grid posts back to get to the next page, it returns the grid w/o formatting.  We are using advanced data binding.  Here's some code snippets.  Does anyone know how to get around this?  Thanks.

    <telerik:RadGrid ID="BusinessGrid" runat="server" AutoGenerateColumns="False"   
    CellSpacing="0" GridLines="None" AllowPaging="True" AllowSorting="True"   
    OnNeedDataSource="BusinessGrid_NeedDataSource" Height="375px"   
    Width="100%" PageSize="25">
    .
    .
    .
    <ExportSettings HideStructureColumns="true" IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true"  
    <Pdf PageWidth="297mm" PageHeight="210mm" />   
    <Pdf PageWidth="297mm" PageHeight="210mm" />   
    </ExportSettings>
  2. Kostadin
    Admin
    Kostadin avatar
    1713 posts

    Posted 08 Nov 2012 Link to this post

    Hi Brian,

    From the provided description I could not completely understand what is the exact issue you are facing. Could you please elaborate a bit more on your scenario ? Providing us your page markup as well as the related code behind will help us understand your scenario in details.

    Greetings,
    Kostadin
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Brian
    Brian avatar
    9 posts
    Member since:
    Dec 2007

    Posted 08 Nov 2012 Link to this post

    You could go to our test site to recreate the scenario in which this happens.  http://wisdpuat.wi.gov

    Do a search on "DANE" county.  You should see the radgrid with 5 pages or so.  Click on one of the export buttons, say pdf.  After the export, go back to the application and click to another page in the grid.

    This grid does not use AJAX at all. 

    The only event tied to the grid is the needdatasource event. 

    protected void BusinessGrid_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        var data = ViewState["Businesses"] as List<AccountData>;
        if (data == null)
        {
            data = GetNewGridData().OrderBy(b => b.VendorName).ToList();
        }
        BusinessGrid.DataSource = data.Distinct();
    }
  5. Kostadin
    Admin
    Kostadin avatar
    1713 posts

    Posted 13 Nov 2012 Link to this post

    Hi Brian,

    I follow the steps which you provided but still could not replicate the issue. I also tried with different browsers but again to no avail. Could you let me know whether you found a solution on your own or the issue still remains?

    All the best,
    Kostadin
    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.
  6. Brian
    Brian avatar
    9 posts
    Member since:
    Dec 2007

    Posted 13 Nov 2012 Link to this post

    We still get this issue on that site in IE8, IE9, and Firefox.  After exporting the pdf, go to page 2 by clicking the number in the page template in the footer. Here's a link to a Screen Shot of the issue.

  7. Kostadin
    Admin
    Kostadin avatar
    1713 posts

    Posted 16 Nov 2012 Link to this post

    Hi Brian,

    Could you please try to toggle the OpenInNewWindow property?  If that does not prove helpful I have to ask that you send us your page markup and the related code behind so that we can try to find out the root cause of this behavior.

    I am looking forward to your reply.

    Kind regards,
    Kostadin
    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