Remove the "Delete" action controls in c8y DataGrid Component

I want to remove the “Delete” action controls of some of the elements in the datagrid component.

How can I do that ?

<c8y-data-grid
        [columns]="GroupColumns"
        [pagination]="GroupPagination"
        [actionControls]="groupActionControls" // actioncontol is valid for the entire datagrid.But I just want to remove some of them
        [serverSideDataCallback]="$any(fetchGroups)"
        [title]="'Groups' | translate"
        [refresh]="refreshGroups"
        class="col-xs-12 no-gutter d-block m-t-24"
        (onConfigChange)="onGroupGridConfigChange($event)"
    >

The ActionControl interface provides the showIf property, which can be used to define for which entry you want to have the action displayed:

/**
     * Determines if the action should be shown for given item (if not defined, the action will be shown always).
     * @param item The item for which the action is supposed to be performed.
     */
    showIf?: ((item: Row) => boolean) | Function;


Christian Guether

3 Likes

Thanks for your help and info.