Datatable column alignment


Topic: Datatable column alignment

Dae asked 2 years ago

Expected behavior I am looking for a way to align a column right or centered. I am creating the table with async in JS. I tried using formatCell but the problem is that only align the cells but not the header.

Actual behavior

Resources (screenshots, code snippets etc.)

cols[0]= [ { label: 'field1', field: 'field1', width:120, fixed: true}, { label: 'field2', field: 'field2' }, ..... ]


salas ljs pro premium priority answered 2 years ago

use text-center class


Creerapp pro premium priority answered 2 years ago

Hi

Same issue.

The class on the td elements are deleted at load.


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: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 5.0.0
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: No
  • Provided link: No