Please specify the 'fields' parameter while calling the 'toCsv' or 'toExcel' methods. Be sure to download a newer version from
https://www.jeasyui.com/extension/datagrid_export.php$('#dg').datagrid('toCsv', {
filename: 'datagrid.csv',
fields: ['itemid','productid'],
rows: rows,
footer: [{
productid: 'Summary',
listprice: 30
},{
productid: 'Summary',
listprice: 40
}]
});