This example is standalone implementation of the online Grid View - Exporting Data demo.
It illustrates how to export the GridView 's content to several rich text formats via the ExportTo*** methods.
This example is an illustration of the KA18639: How to export GridView rows and keep end-user modifications (such as sorting, grouping, filtering, selection) KB Article. Refer to the Article for an explanation.
Please note the following key moments:
- The GridView Extension should be defined via a separate PartialView without any additional tags (see the Using Callbacks help topic for more information);
- The GridView's PartialView should be wrapped within a form in order to apply the client layout state (sorting, filtering, etc.);
- An export trigger should submit this form to the corresponding Controller Action (i.e., make a POST request);
- The GridViewSettings (especially the Name property) should be the same in PartialView and Controller;
- The datasouce/Model should be the same in PartialView and Controller.
Question Comments
Added By: Nurhak Kaya at: 9/4/2012 7:58:55 AM
Really good! Thanks a lot!