Skip to content

DevExpress-Examples/winui-gridcontrol-export-grid-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinUI GridControl - Export GridControl Data in Code

This example exports GridControl data to a CSV file.

Follow the steps below to export GridControl data in code-behind:

  1. Reference the DevExpress.WinUI.Grid.Printing and DevExpress.WinUI.Printing namespaces.
  2. Create a GridControlPrinter instance that contains the GridControl you want to export. Pass the created GridControlPrinter instance to the PrintableLink's constructor as a parameter to create a PrintableLink instance. The PrintableLink class creates a link between a GridControl and an exported document.
  3. Call a CreateDocument* method to create a new document. Then, call an ExportTo* method according to a file format you need.

Available Formats

You can export GridControl data to the following formats:

Format Methods
Csv ExportToCsv
Docx ExportToDocx
Html ExportToHtml
Image ExportToImage
Mail ExportToMail
Mht ExportToMht
Pdf ExportToPdf
Rtf ExportToRtf
Text ExportToText
Xls ExportToXls
Xlsx ExportToXlsx
Xps ExportToXps

Files to Look At

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

Releases

No releases published

Languages