angular generic ui display checkbox from html file

162 views Asked by At

I am using this grid for angular version.

https://generic-ui.com/guide/columns

To show checkbox we can do following from ts file.

{
header: 'GuiCellView.CHECKBOX',
field: 'isFruit',
type: GuiDataType.BOOLEAN,
view: GuiCellView.CHECKBOX,
}

Here is example of that : https://generic-ui.com/guide/columns

But I want to show this checkbox from html file so I have tried this as per below but it is displaying like true and false value instead of chekbox.

 

<gui-grid-column header="test" field="showtest" type=GuiDataType.BOOLEAN
            view=GuiCellView.CHECKBOX>
              <ng-template let-value="value">
                {{value.CHECKBOX}}
              </ng-template>
            </gui-grid-column>  

Any idea on this

1

There are 1 answers

0
Sam On BEST ANSWER

You can try to put custom html in like below.

 <gui-grid-column header="test" field="showtest" name="CHECKBOX"
            view='checkbox'
             [view]="GuiCellView">
              <ng-template let-value="value">
                 <input type="checkbox" [checked]="showtest">
              </ng-template>
            </gui-grid-column>