Search code examples
cssangularstylesvmware-clarity

Clarity Design Datagrid how to change column width


I want to manual set column(head and body) size(width, height). I tired to set style but not work and find all document not found about this.

DataGrid Component

enter image description here

DataGrid set width size not work

enter image description here


Solution

  • Setting the column width:

    <clr-dg-column [style.width.px]=“200”>my column</clr-dg-column>

    This will also set width for all column cells.

    To control height and width you can either put the datagrid inside a container with a set height/width.