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

[Solved] RadGrid Refresh on ExportToExcel()

4 Answers 191 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mgl mgl
Top achievements
Rank 1
mgl mgl asked on 06 Nov 2009, 10:53 PM
Hi,

I have ajaxified my radgrid with RadAjaxManager per your demo at http://www.telerik.com/community/code-library/aspnet-ajax/general/export-radgrid-content-to-excel-word-csv-pdf-with-ajax-enabled.aspx. I have also disabled the ajax on ExportToExcel().

Everything works great. However, if the data gets updated between the time the page loaded and the time the export happens, excel has the latest data, but the radgrid does not. How do you 'force' a refresh on the radgrid?

I did notice that the itemdatabound event is getting hit. So how come the itemdatabound grid does not render to the browser?

4 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 11 Nov 2009, 04:11 PM
Hi mgl,

To refresh the grid at a given stage of the lifecycle explicitly (to make sure that the latest data will be fetched from its source), invoke the Rebind() server method of the control explicitly. More information about the grid lifecycle can be found here.

Best regards,
Sebastian
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
mgl mgl
Top achievements
Rank 1
answered on 11 Nov 2009, 10:18 PM
Hi Sebastian,

Could you point me to your documentation on ExportToExcel(). I would like to know what events are called internally by that method and perhaps what page properties are being set, if any.

0
Princy
Top achievements
Rank 2
answered on 12 Nov 2009, 08:02 AM
Hi,

Here's the help document which provides an overview of the Export functionality of grid with common properties and events. Check it out and see if it helps:
RadGrid Export

Thanks
Princy.
0
mgl mgl
Top achievements
Rank 1
answered on 12 Nov 2009, 06:46 PM
Hi Princy,

Is there more detailed documentation than the one you referred me to. I want to know if ExportToExcel is calling any external methods and setting any other properties...

Thanks,
mgl
Tags
Grid
Asked by
mgl mgl
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
mgl mgl
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or