Skip to content

Commit 621287f

Browse files
committed
docs(grid): Add section about the GenerateXlsxOutput() method
1 parent df1537b commit 621287f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

controls/grid/functionality/exporting/export-formats/xlsx-and-docx-export.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,14 @@ Additionally you can change the default alignment on **OnInfrastructureExporting
162162

163163
Both **xlsx** and **docx** support exporting of images. The images are included automatically in the exported document and you do not have to set any specific property. Keep in mind images with an **absolute** or **relative** path are supported, but binary images are not.
164164

165+
## Generate Export Output
166+
167+
RadGrid provides a convenient way to extract the XLSX output as a string without actually exporting - this is done via the `GenerateXlsxOutput()` method.
168+
169+
This can be used to get the content out of multiple grids simultaneously, then modify or save it. You can check the [Export Multiple Grids](https://demos.telerik.com/aspnet-ajax/grid/examples/functionality/exporting/excel-export-multiple-grids/defaultcs.aspx?product=grid) live demo which demonstrates a practical implementation.
170+
171+
**If you are not actually exporting** at the end of the logic and the Response is not cleared, the state of the grids may change. This is especially true when the `IgnorePaging` and `HideStructureColumns` exporting properties are enabled. To return the original state, you can set `AllowPaging` to true then call `Rebind()` to the grid instance. Alternatively, you can try using the `Response.Redirect(Request.RawUrl);` approach.
172+
165173
## Limitations
166174

167175
* No hierarchy support

0 commit comments

Comments
 (0)