Grid TagHelper ClientHeaderTemplate

1 Answer 483 Views
Grid
Patrick
Top achievements
Rank 1
Patrick asked on 31 May 2022, 07:12 PM

Hi Guys,

maybe i'm missing something, but could someone help me how i could define a ClientHeaderTemplate / HeaderTemplate for a Grid Column with the TagHelper?

<columns>
   <column field="Alert" title="" ***/>
</columns>

Thanks for your help!

Best wishes
Patrick

1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander
Telerik team
answered on 03 Jun 2022, 12:13 PM

Hi Patrick,

Thank you for the provided information and snippet.

You can achieve the desired result by specifying the "header-template" TagHelper attribute by either passing a function or directly displaying it. For example:

<columns>
    <column field="ShipName" title="Ship Name" header-template="Custom Header Template" />
</columns>

Here is a Telerik REPL example that illustrates this.

In addition, I may also recommend reviewing the Frequently Asked Questions Documentation that lists some of the frequently asked questions revolving around the Telerik UI for ASP.NET Core Grid. 

I hope this helps.

Regards,
Alexander
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Patrick
Top achievements
Rank 1
commented on 03 Jun 2022, 07:18 PM

Hi Alexander,

thanks a lot for your help! Your example was very usefull.

Thanks for the link to the FAQ section but the "header-template", i couldn't find it there. But it's *bookmarked* :)

Best wishes
Patrick

Tags
Grid
Asked by
Patrick
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or