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

Export from client side. RadGridTable object?

3 Answers 175 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 08 Sep 2008, 04:28 PM
I'm trying to export the grid from the client side.  I'm having trouble getting a reference to the RadGridTable.

See below:

Client-side RadGridTable object methods

ExportToWord()

ExportToExcel()

The documentation states that this object will not show up on the client Html unless certain features are used.  I'm using several of the features.

I'm wondering if there's a tag I need to add to may aspx file inside the grid tag.

Also, I found this in the posts, but the function get_masterTableView is missing:
function ExportGrid() 
   var masterTable = $find("<%=RadGrid1.ClientID %>").get_masterTableView(); 
   masterTable.exportToExcel(); 
 



Any ideas?

Thanks,
Tom

3 Answers, 1 is accepted

Sort by
0
Accepted
Iana Tsolova
Telerik team
answered on 09 Sep 2008, 03:20 PM
Hi Tom,

Please find attached a sample demonstrating RadGrid export using the client-side API of the control. Give it a try and let me know what differs in your case.

If your grid is ajaxified, please review this help article on how to export RadGrid with ajax enabled.
 
Kind regards,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Tom
Top achievements
Rank 1
answered on 10 Sep 2008, 03:23 PM
I used an alert to know that this client-side code was running in none debug mode, but Excel never opened.

I was able to use the server-side function to get this to work properly.

How does the implementation of the server-side and the client-side functional differ?  Are there trade-offs for my code?
0
Iana Tsolova
Telerik team
answered on 11 Sep 2008, 08:43 AM
Hello Tom,

Both client and server-side RadGrid exporting work same way. And as you can see the client code used in my sample is same as your. Maybe if you could send me the problematic page, I can find why the client-side export does not work in your case.

Kind regards,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Tom
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Tom
Top achievements
Rank 1
Share this question
or