Export

Enable Exporting

FancyGrid supports Excel and CSV exporting.
To enable it, it requires to set exporter: true.
For exporting to Excel there is method exportToExcel.
For exporting to CSV there is method exportToCSV.


var grid = new FancyGrid({
  exporter: true,
  tbar: [{
    text: 'Export to Excel',
    handler: function() {
      this.exportToExcel();
    }
  }, {
    text: 'Export to CSV',
    handler: function() {
      this.exportToCSV({
        fileName: 'myCSV',
        header: true,
		all: true
      });
    }
  }],
  ...

By default it exports only visually displayed data.
To export all data it requires to set property all: true.

Sample:


grid.exportToCSV({
  header: true,
  all: true
});

Excel

Method exportToExcel accept 2 properties: fileName and header.
Doc link exportToExcel

CSV

Method exportToCSV accept 3 properties: fileName, header, separator.
Doc link exportToCSV

Sample: Exporting

`