RadGrid PageSize=20 and export all data in Excel doesn't work on IIS7.5

5 posts, 0 answers
  1. PopaC
    PopaC avatar
    4 posts
    Member since:
    Mar 2016

    Posted 18 Jul Link to this post

    I permit to contact you because I’ve a problem with a telerik:RadGrid component and the Export Fonction

    In fact, we have the PageSize of 20 but we want to export all data without filter.

    I developed the code like this:

           <telerik:RadGrid  ID="xxxxxxx" runat="server" DataSourceID="xxxxx"  OnItemCommand="ApplicationDependency_ItemCommand" OnItemDataBound="ApplicationDependency_ItemDataBound" OnItemCreated="ApplicationDependency_ItemCreated" AutoGenerateColumns="False" AllowPaging="True" AllowFilteringByColumn="True"  PageSize="20"  AllowCustomPaging="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" ClientSettings-AllowColumnsReorder="false" AllowSorting="True" CellSpacing="0" GridLines="None" Height="800px" ShowGroupPanel="True">
                  <ExportSettings
                    FileName="ApplicationDependency"
                    ExportOnlyData="true"
                    IgnorePaging="true"
                    UseItemStyles="true"
                    ></ExportSettings>

    It works fine on my local Pc and on the Acceptance Server. But in Production it doesn’t work and the export give me just the 20 firsts lines. For me, the only difference is IIS 7.5on the production and IIS 8 for Acceptence.
  2. Kostadin
    Admin
    Kostadin avatar
    1708 posts

    Posted 21 Jul Link to this post

    Hello GUILLAUME,

    I examined the provided code and as far as I can see it looks correct. Could you please verify that you are using the same version of the control on both sides-local machine and server? Additionally you can manually remove the paging by hooking OnItemCommand and set AllowPaging property to false and rebind the grid.
    protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
    {
        if(e.CommandName == RadGrid.ExportToExcelCommandName)
        {
            RadGrid1.AllowPaging = false;
            RadGrid1.Rebind();
        }
    }

    Please give this suggestion a try and let me know about the result.

    Regards,
    Kostadin
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. PopaC
    PopaC avatar
    4 posts
    Member since:
    Mar 2016

    Posted 22 Jul in reply to Kostadin Link to this post

    Dear all,
    I’m PierreC, Microsoft Partner Subcontractor for KPMG.
    I permit to post the problem on behalf of Guillaume
    So for answer to your answer : (RadGrid1.AllowPaging = false; and DataBind), I can’t do it because, I’ve 500 lines and it take so more time (time out error) with the treatment of the RadGrid.
    If the RadGrid was not so long, I didn’t need to reduce the display to 20 lines per pages !
    With the timeout error on server after 3 minutes, and as a DevOps role, it’s not acceptable to increase the time out on the server for all this web site only for one component.
    Please, send me another solution to resolve it.
    For info, it works on a IIS8, but I need to install it on a IIS7.5.
    Thanks in advance,
  5. PopaC
    PopaC avatar
    4 posts
    Member since:
    Mar 2016

    Posted 22 Jul Link to this post

    Thanks for remove the company name. I can't modify my post
  6. Kostadin
    Admin
    Kostadin avatar
    1708 posts

    Posted 27 Jul Link to this post

    Hello Guillaume,

    In order to export all data to Excel you need to enable IgnorePaging property. This property do exactly the same as the previously suggestion - disable the paging and rebind the grid in order to populate it with all data. I prepared a small sample with dummy data and attached it to this thread. Could you please host this page on your production server and let me know whether the issue remains?​

    Regards,
    Kostadin
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017