[VUE 2] Export is shifted 1 column with checkboxes
Posted: Tue Oct 12, 2021 5:18 pm
by jhk
Hi,
I'm using version 4.2.4.
I have a grid that uses the selectionMode feature with checkboxes. When I try to export my grid it appears that the checkbox column is also exported thus shifting the whole file (see attachment)
These are my relevant configurations:
{
excelExporterFeature: {
exporterConfig: {
// Choose the columns to include in the exported file
// By not choosing any it will default to all.
},
// pass the export library to exporter feature
zipcelx,
},
...
selectionMode: {
row: true,
multiSelect: true,
preserveSelectionOnDatasetChange: false,
checkbox: true,
showCheckAll: true,
},
}
I have some 40 columns so I'd rather not type them out explicitly. Is there an easy fix ?
Thanks
Re: [VUE 2] Export is shifted 1 column with checkboxes
Posted: Tue Oct 12, 2021 6:22 pm
by mats
Sure, you can configure the check column to not be exported. See checkbox docs for GridSelection#selectionMode
/**
* The selection settings, where you can set these boolean flags to control what is selected. Options below:
* @config {Object} selectionMode
* @param {Boolean} selectionMode.row select rows
* @param {Boolean} selectionMode.cell select cells
* @param {Boolean} selectionMode.rowCheckboxSelection select rows only when clicking in the checkbox column
* @param {Boolean} selectionMode.multiSelect Allow multiple selection
* @param {Boolean|Object} selectionMode.checkbox Set to true to add a checkbox selection column to the grid,
* or pass a config object for the {@link Grid.column.CheckColumn}
* @param {Boolean} selectionMode.showCheckAll true to add a checkbox to the selection column header to select/deselect all rows
* @param {Boolean} selectionMode.deselectFilteredOutRecords true to deselect rows that are filtered out
* @param {Boolean} selectionMode.includeChildren true to also select/deselect child nodes when a parent node is selected
* @param {Boolean} selectionMode.preserveSelectionOnPageChange This flag controls whether the Grid should preserve
* its selection when loading a new page of a paged data store
* @param {Boolean} selectionMode.preserveSelectionOnDatasetChange This flag controls whether the Grid should preserve
* its selection of cells / rows when loading a new dataset (assuming the selected records are included in
* the newly loaded dataset)
* @default
* @category Selection
*/