Skip to content

ui-grid: Display checkbox instead of Boolean value without using custom cellTemplate #3879

@khpnguyen

Description

@khpnguyen

When I set a cell type to 'boolean' it would display True/False instead of a checkbox. When I click into the cell then a checkbox would appear for me to select/deselect to change the boolean value. However, I want the cell to alway display the checkbox instead of the boolean value. I know this can be done through a custom cellTemplate but would love to be able to achieve this without resolve to using one.

Is this possible? If not I would like to request this to be a feature. Maybe having some option like "renderCheckboxes: true" so that the cell would display the checkbox instead of True/False.

columnDefs: [{
           {
          name: 'D',
          field: 'display',
          allowCellFocus: true,
          type: 'boolean',
          headerCellClass: 'header_style',
          cellClass: 'name_style',
          enableCellEdit: true,
          enableHiding: false,
          enableColumnMenu: false,
          width: 35,
        }
}]

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions