How can i add a data-testid to a GridCommandColumn?

1 Answer 9 Views
Grid
Robert
Top achievements
Rank 1
Robert asked on 25 Sep 2025, 07:38 PM

How can i add a data-testid to a GridCommandColumn?

I am trying to add a static id to a GridCommandColumn, but am not having any luck.  For GridColumns I am able to add a HeaderTemplate and add a data-testid that way

<GridColumn HeaderClass="left-wrap" Field="UId" Visible="false" ShowFilterCellButtons="false" Title="TestColumn">

<HeaderTemplate>
<div id="col-testcolumnid-home" data-testid="col-testcolumnid-home" class="k-cell-inner">
<span class="k-link">TestColumn</span>
</div>
</HeaderTemplate>
</GridColumn>

Is there a way to add a data-testid to a GridCommandColumn component?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 26 Sep 2025, 08:01 AM

Hello Robert,

We plan to add a HeaderTemplate for the Grid command column in late 2025. Until then, your options are:

  • JavaScript DOM manipulation.
  • Use the HeaderClass parameter of the GridCommandColumn instead of a custom data-id attribute.

On a side note, your Telerik account is currently not assigned to an active license. Please ask the license holder at your company to resolve this, so that you can use technical support.

Regards,
Dimo
Progress Telerik

Your perspective matters! Join other professionals in the State of Designer-Developer Collaboration 2025: Workflows, Trends and AI survey to share how AI and new workflows are impacting collaboration, and be among the first to see the key findings.
Start the 2025 Survey
Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or