jQuery/JS Common - Object Structures - PdfCell - padding

Specifies the top, bottom, left, and right paddings of the DataGrid cell.

Type:

Object

Uses the measure units which are specified in the constructor of the jsPDFDocument object.

index.js
  • $(function(){
  • $('#exportButton').dxButton({
  • // ...
  • onClick: function() {
  • const doc = new jsPDF();
  • DevExpress.pdfExporter.exportDataGrid({
  • jsPDFDocument: doc,
  • component: dataGrid,
  • customizeCell: function(options) {
  • const { gridCell, pdfCell } = options;
  • if(gridCell.rowType === 'data') {
  • pdfCell.padding = { top: 10, right: 10, bottom: 10, left: 10 };
  • }
  • }
  • }).then(function() {
  • doc.save('Customers.pdf');
  • });
  • }
  • });
  •  
  • const dataGrid = $('#gridContainer').dxDataGrid({
  • // ...
  • }).dxDataGrid('instance');
  • });

bottom

Specifies the bottom padding of the DataGrid cell.

Type:

Number

left

Specifies the left padding of the DataGrid cell.

Type:

Number

right

Specifies the right padding of the DataGrid cell.

Type:

Number

top

Specifies the top padding of the DataGrid cell.

Type:

Number