Last Updated: 04 May 2023 13:30 by ADMIN
Created on: 27 Apr 2023 16:42
Category: Grid
Type: Bug Report
grid clienttemplate not working in tilelayout template

If I put the Grid into a kendo-template for the TileLayout control, the ClientTemplate does not work properly. It only gets called once regardless of the number of items in the grid and the data is not being passed in. 

This is my column definition:

columns.Bound(c => c.DocumentKey).Title(" ").ClientTemplate("#=CommandTemplate(data)#").Width(70);

And I am calling the .ToClientTemplate() on the Grid. Everything else work great except for this one issue.

I have not been able to find any other info, so what am I missing?

1 comment
Posted on: 04 May 2023 13:30

Hello Michael,

Since the Grid is declared into a Kendo Template the ClientTemplate configuration is another nested template inside the first one.

When you use nested templates you need to escape the "#" hash literal in the inner template to ensure it is going to be evaluated in the proper scope.

columns.Bound(c => c.DocumentKey).Title(" ").ClientTemplate("\\#=CommandTemplate(data)\\#").Width(70);

Please give this suggestion a try and let us know whether the issue persists.

Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources