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

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

4 Answers 120 Views
Grid
This is a migrated thread and some comments may be shown as answers.
PopaC
Top achievements
Rank 1
PopaC asked on 18 Jul 2016, 12:20 PM
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.

4 Answers, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 21 Jul 2016, 07:26 AM
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.
0
PopaC
Top achievements
Rank 1
answered on 22 Jul 2016, 09:47 AM
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,
0
PopaC
Top achievements
Rank 1
answered on 22 Jul 2016, 09:57 AM
Thanks for remove the company name. I can't modify my post
0
Kostadin
Telerik team
answered on 27 Jul 2016, 06:49 AM
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.
Tags
Grid
Asked by
PopaC
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
PopaC
Top achievements
Rank 1
Share this question
or