Home > Software design >  angular generic ui display checkbox from html file
angular generic ui display checkbox from html file

Time:12-14

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

CodePudding user response:

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>  
  • Related