DataTable right align


Topic: DataTable right align

buesser pro premium priority asked 2 years ago

How can I set the alignment of a datatable column?

The fixed column parameter explained here doesnt work: https://mdbootstrap.com/docs/standard/data/datatables/#docsTabsAPI

Example:

const kategorienColumns = [

{ label: 'Name', field: 'name' , width: 800},
{ label: 'Anzahl', field: 'anzahl', fixed: 'right'},
{ label: 'Steuern', field: 'steuern'} 

];

Thanks so much

Severin Schmid


kpienkowska staff answered 2 years ago

Here is an example from the documentation. https://mdbootstrap.com/docs/standard/data/datatables/#section-fixed-columns

For this option to work, you must set the width and fixed option for the column you want to stick to one side.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.2.0
  • Device: HP EliteBook 1030
  • Browser: Chrome
  • OS: Win 10
  • Provided sample code: No
  • Provided link: Yes