Grid Toolbar - Move ExcelExport, CSVExport to right side and Search to left side

Is it possible to switch the default position of the ExcelExport and CSVExport buttons to the right side of the toolbar and the Search and Column chooser to the left side? 


1 Reply

PS Pavithra Subramaniyam Syncfusion Team November 8, 2023 12:14 PM UTC

Hi Mark Griffiths,


You can achieve your requirement by setting the “align” property for the toolbar items inside the Grid “created” event. Please refer to the below code example, API and sample link for more information.


created: () => {

  grid.toolbarModule.toolbar.items.filter((e) => {

    e.align =

      e.text == 'Excel Export' || e.text == 'CSV Export' ? 'Right' : 'Left';

  });

},

 


API         : https://ej2.syncfusion.com/javascript/documentation/api/toolbar/itemModel/#align


Sample  :https://stackblitz.com/edit/ycstpv-et7qxv?file=index.js


Regards,

Pavithra S


Loader.
Up arrow icon