# Remove the "Delete" action controls in c8y DataGrid Component

**URL:** <https://community.cumulocity.com/t/remove-the-delete-action-controls-in-c8y-datagrid-component/4665>\
**Category:** Forum\
**Tags:** Angular, c8y, cumulocity\
**Created:** [April 23, 2024, 3:50pm UTC](https://community.cumulocity.com/t/remove-the-delete-action-controls-in-c8y-datagrid-component/4665 "2024-04-23T15:50:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brkngcn](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@brkngcn](https://community.cumulocity.com/u/brkngcn)\
**Post date:** [April 23, 2024, 3:50pm UTC](https://community.cumulocity.com/t/remove-the-delete-action-controls-in-c8y-datagrid-component/4665/1 "2024-04-23T15:50:50Z")

</div>

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

How can I do that ?

 ![DELETEBUTTON](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/5/6/56d42628ea828eb4cd84fa2120d52b1641890961.png)

```auto
<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)"
    >

```

---

<div class="post-metadata">

**Author:** ![Christian\_Guether1](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/christian_guether1/32/14848_2.png) [@Christian\_Guether1](https://community.cumulocity.com/u/Christian_Guether1)\
**Post date:** [April 23, 2024, 4:30pm UTC](https://community.cumulocity.com/t/remove-the-delete-action-controls-in-c8y-datagrid-component/4665/2 "2024-04-23T16:30:56Z")

</div>

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

```auto
/**
     * 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

[Software AG Professional Services](https://www.softwareag.com/en_corporate/resources/services/professional-services.html)

[![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/c/3/c3a93a2618e4708f51be40fe2e142061f7c4edc7.jpeg)](https://www.softwareag.com/en_corporate/resources/services/fast-track-services.html)

---

<div class="post-metadata">

**Author:** ![brkngcn](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@brkngcn](https://community.cumulocity.com/u/brkngcn)\
**Post date:** [April 23, 2024, 4:43pm UTC](https://community.cumulocity.com/t/remove-the-delete-action-controls-in-c8y-datagrid-component/4665/3 "2024-04-23T16:43:47Z")

</div>

Thanks for your help and info.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [October 20, 2024, 4:44pm UTC](https://community.cumulocity.com/t/remove-the-delete-action-controls-in-c8y-datagrid-component/4665/4 "2024-10-20T16:44:15Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
