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

RadGrid1.ExportSettings.IgnorePaging = True but I still only get the first page in the Excel file

1 Answer 156 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karl Wilkens
Top achievements
Rank 1
Karl Wilkens asked on 02 Mar 2012, 01:40 AM
Hi, 

I have a radgrid within a multiPage interface. The grid populates fine. Here is the Aspx definition on this

<telerik:RadGrid ID="RadGrid1" runat="server" AllowCustomPaging="True" 

                    AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" 

                   GridLines="None" Skin="WebBlue">


I have an imagebutton that when clicked does this 

 Dim filename As String =  "whatever.xls"

        RadGrid1.ExportSettings.OpenInNewWindow = True

        RadGrid1.ExportSettings.FileName = filename

        RadGrid1.ExportSettings.ExportOnlyData = True

        RadGrid1.ExportSettings.IgnorePaging = True

        RadGrid1.ExportSettings.OpenInNewWindow = True

No matter what, the resulting excel only contains the first 25 rows. I have also tried forcing the above code by adding the following

  RadGrid1.MasterTableView.AllowPaging = false

        RadGrid1.Rebind()

'... the above code here and then..

 RadGrid1.MasterTableView.AllowPaging = true

        RadGrid1.Rebind()

No approach seems to work. There is no AjaxManager involved, and the grid itself is not ajaxified. Anyone out there have any ideas? The only complication in all of this is that the grid resides in a multipage / tabbed interface, but the export to Excel button resides outside of the multipiage. Also, I am using MasterPages - pretty simple there - no AjaxManager there either. Any thoughts appreciated.

      

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 06 Mar 2012, 02:25 PM
Hello,

The problem you are facing is mostly caused by the custom paging you are using. When you say IgnorePaging you need to provide the full datasource to RadGrid in order to receive the expected behavior. You could check this online demo application for more information about the custom paging functionality of RadGrid.

Regards,
Andrey
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.
Tags
Grid
Asked by
Karl Wilkens
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or