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

ShowExportToExcelButton Attribute not Available

16 Answers 296 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Simin
Top achievements
Rank 1
Simin asked on 25 Sep 2009, 03:48 PM
This help topic, http://www.telerik.com/help/aspnet-ajax/grddefaultbehavior.html, says ShowExportToExcelButton can be set on CommandItemSettings to display the export to excel button.  However, It does not work with the latest library I have.  Any thoughts?

16 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 26 Sep 2009, 08:45 AM
Hi Simin,

Are you trying to export from ajaxified grid? If so please review the following help article for more information how to achieve the desired functionality.
http://www.telerik.com/help/aspnet-ajax/grdexportwithajax.html

Greetings,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Simin
Top achievements
Rank 1
answered on 28 Sep 2009, 01:54 PM
Yes, I am trying to export from ajax enabled grid. I have got it work with CommandItemTemplate and using the information from the link you have provided. 
0
Tom
Top achievements
Rank 1
answered on 04 Oct 2009, 11:40 AM
<CommandItemSettings  
AddNewRecordImageUrl="Image1.jpg" 
AddNewRecordText="AddNewRecordCustomText" 
RefreshImageUrl="Image2.jpg" 
RefreshText="RefreshCustomtext" 
ShowExportToExcelButton="true" 
ShowExportToCsvButton="true" />      

I'm having a similar problem described in the first post. The 'ShowExportToExcelButton' does not appear in the intellisense. When I just type it in and ignore the error, the button is not displayed in the commanditem bar.
0
Pavlina
Telerik team
answered on 07 Oct 2009, 05:42 PM
Hi Tom,

With the latest internal build RadGrid exposes the functionality to include export buttons to the default CommandItem. The GridCommandItemSettings class now has 4 new boolean properties [DefaultValue(false)] that enable the respective GridTableView to show export buttons for the 4 supported export types in its CommandItem.

New Properties in GridTableView.CommandItemSettings:

ShowExportToExcelButton
ShowExportToWordButton
ShowExportToPdfButton
ShowExportToCsvButton

Regards,

Pavlina
the Telerik team

 


Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Tom
Top achievements
Rank 1
answered on 07 Oct 2009, 11:36 PM
Ah right. I couldn't see anything on that page to show it was a very new (beta) function... might be worth putting that on the page in future.
Thanks for clearing up the issue! :)
0
CSurieux
Top achievements
Rank 2
answered on 21 Oct 2009, 12:38 PM
Hello Pavlina,

I can't find them even with last build, where are they ?

Regards
CS
0
Pavlina
Telerik team
answered on 22 Oct 2009, 03:15 PM
Hello Christian,

RadGrid now provides built-in Export buttons in the CommandItem of each GridTableView. Using the GridTableView.CommandItemSettings.ShowExportTo[Word/Excel/Pdf/Csv]Button properties, you can enable/disable individual export buttons in the CommandItem.
For more information, refer to the following online example:
Grid/MS Excel/MS Word/CSV

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
CSurieux
Top achievements
Rank 2
answered on 22 Oct 2009, 04:06 PM
Hi Pavlina,

I am usig the build

2009.2.1014.35


And I get an error in VS when I try to add this to CommandItemsettings.
And the page don't load when running it ???

Am I missing again something ?

CS
0
Pavlina
Telerik team
answered on 22 Oct 2009, 04:51 PM
Hello Christian,

Attached to this message is a simple working project which handles the desired functionality. Please give it a try and let me know if it works for you.

I hope this helps.

Sincerely yours,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
CSurieux
Top achievements
Rank 2
answered on 22 Oct 2009, 05:59 PM
Sorry but it It is the version 1016 which is a beta.
When I replaced with 1014 and with the last official release, it doesn't work.
You should advise when you give help with something which .... is not available at the time of your answer, I spent lot of time on this checking where could be the error.


Still expecting a ShowCreateNew avoiding writing code to set false after a findcontrol...

Anyway thanks...

CS
0
Pavlina
Telerik team
answered on 23 Oct 2009, 06:52 AM
Hello Christian,

Unfortunately built-in Export buttons in the CommandItem of each GridTableView was delayed. Therefore it was included in Q3 2009 Beta release.

Please excuse us for the inconvenience caused.

Regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
CSurieux
Top achievements
Rank 2
answered on 23 Oct 2009, 09:46 AM
Ok thanks,

Could you ask dev team to also automate the fact that the export button must not use a callback, thta way we should not have to add this annoying OnAjaxRequestStart code.

On my side it is very uneasy because the grid come from a user control (ascx) and I have already an OnAjaxRequestStart  set on AjaxManager in the main Page used for positionning the LoadingPanel centered.

How to add a second OnAjaxRequestStart nedded by this grid from the custom control loaded dynamically ????


Thanks
CS
0
Pavlina
Telerik team
answered on 26 Oct 2009, 11:00 AM
Hello Christian,

You could add additional if statement to disable Ajax during export in the OnAjaxRequestStart in the main Page used for positioning the LoadingPanel centered.

Greetings,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
CSurieux
Top achievements
Rank 2
answered on 27 Oct 2009, 02:34 PM
Hello,

That's strange, they were in Q3 beta but disapeared from 2009.2.2025.35 !
Hope they will be in the final Q3 with the non callback automatically trigered.

CS
0
bberdel
Top achievements
Rank 1
answered on 10 Dec 2010, 03:23 PM
How do you get the Export buttons to appear when you also have a commandItemTemplate?

0
Pavlina
Telerik team
answered on 10 Dec 2010, 03:54 PM
Hello Bberdel,

You can mimic the built-in buttons this way:
<CommandItemTemplate>
    <table class="rcCommandTable" width="100%">
        <td>
            <asp:Button ID="Button1" runat="server" Text=" " CssClass="rgExpCSV" CommandName="ExportToCSV" />
            <asp:Button ID="Button2" runat="server" Text=" " CssClass="rgExpPDF" CommandName="ExportToPdf" />
        </td>
        <td style="float: right">
            <asp:Button ID="Button3" runat="server" Text=" " CssClass="rgAdd" CommandName="InitInsert" />
        </td>
    </table>
</CommandItemTemplate>

Kind regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start 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
Simin
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Simin
Top achievements
Rank 1
Tom
Top achievements
Rank 1
CSurieux
Top achievements
Rank 2
bberdel
Top achievements
Rank 1
Share this question
or