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

Need an exporting grid

5 Answers 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
DoomerDGR8 asked on 02 Dec 2010, 12:02 PM
Hi! I require all of my RadGrids using the below Skin to ge exportable without paging. Issue is that all grids are on Content Pages that inherit a Single Master page with a RadAjaxManager. All child pages have a RadAjaxManagerProxy. So all grids are AJAXified. I'm into completion here so a major overhaul is not optional. kindly advice a strategy. All grids have different names, btw.

Thanks.

<telerik:RadGrid runat="server" GridLines="None" Skin="Office2007" SkinID="RadGrid_UnPageable" >   
    <MasterTableView EnableNoRecordsTemplate="true" ShowHeadersWhenNoRecords="true">
      <CommandItemSettings ShowRefreshButton="true" ShowExportToWordButton="false" ShowExportToExcelButton="false" ShowExportToPdfButton="false" ShowExportToCsvButton="false" />
        <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" Position="Bottom" />
        <NoRecordsTemplate>There is no data to display.</NoRecordsTemplate>
    </MasterTableView>
    <ExportSettings HideStructureColumns="true" ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" />
    <ClientSettings>
        <Selecting AllowRowSelect="True" />
    </ClientSettings>
</telerik:RadGrid>

5 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 02 Dec 2010, 12:58 PM
Hello Hassan,

You can easily cancel the AJAX request when exporting as explained in the help topic below:
Export from ajaxified grid

As to the built-in skins - I'm afraid it is not possible to export RadGrid together with its skin. Please examine the following links for more information about the supported formats:
PDF export
Word/Excel export (HTML-based)
CSV export
ExcelML basics

Best regards,
Daniel
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
answered on 02 Dec 2010, 01:09 PM
Hello! Thanks for the prompt response. The topic you mentioned suggests to turn off AJAX on RadGrids by looking up a RadGrid on the base of it's name or separate exporting buttons (other then the ones that are defined in the Command Bar of the Grid) and that's not a possible scenario for me. As to exporting with skins, I don't require that. I just said that my RadGrids are using a SkinID. And I have the Commands for exporting enabled through skin. I just want the Grids to export.
0
Accepted
Daniel
Telerik team
answered on 02 Dec 2010, 03:03 PM
Hello Hassan,

The export functionailty won't work with asynchronous request so you will have to find a way to disable/cancel the AJAX requests and perform a normal postback instead. The easiest way would be to put this code in your masterpage.
<script type="text/javascript">
   function onRequestStart(sender, args)
   {
       if (args.get_eventTarget().indexOf("Export") >= 0)
           args.set_enableAjax(false);
   }
</script>

This way you will disable AJAX for all controls that have "Export" in their IDs.

Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
answered on 02 Dec 2010, 03:09 PM
Okay. Now we are getting somewhere. It makes sense to disable AJAX for exporting but do we need to enable it back? I'm currently trying out your suggestion.
0
Accepted
Daniel
Telerik team
answered on 02 Dec 2010, 03:48 PM
Hello Hassan,

No, you don't have to turn it back on. You can see this approach in action on our online demos:
MS Excel/MS Word/CSV
Export to ExcelML

Best regards,
Daniel
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Daniel
Telerik team
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or