This is a migrated thread and some comments may be shown as answers.

custom attribute for tiles

1 Answer 71 Views
TileLayout
This is a migrated thread and some comments may be shown as answers.
ashutosh
Top achievements
Rank 1
Iron
Veteran
ashutosh asked on 02 Mar 2021, 11:10 AM

I want to identify or handle the tiles separately through JavaScript by the id or custom attribute e.g. data-functional-id. 

is there any provision which will allow me to add custom attribute to the tiles? 

1 Answer, 1 is accepted

Sort by
-1
Tsvetomir
Telerik team
answered on 04 Mar 2021, 09:23 AM

Hi Ashutosh,

Currently, the Kendo UI TileLayout goes over its items collection and evaluates the content, and sets IDs that it understands. However, if you would like to access any of the tiles, what I can recommend is that you set a class or an ID to an element in that template. After that, you could use it in order to get the tile that has the class "k-tilelayout-item":

var tile = $(selector).closest(".k-tilelayout-item");

Let me know if additional assistance is required.

 

Kind regards,
Tsvetomir
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/.

Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
commented on 02 Jun 2022, 01:41 PM

I have this need too. There needs to be a feature to set individual classes and data attributes on the tiles themselves. 
Tags
TileLayout
Asked by
ashutosh
Top achievements
Rank 1
Iron
Veteran
Answers by
Tsvetomir
Telerik team
Share this question
or