TileLayout different colors for the header

1 Answer 64 Views
TileLayout
Christophe
Top achievements
Rank 2
Christophe asked on 11 May 2023, 03:47 AM

Hello,

How do change the header color, for each cards like the picture,

 

Thanks

Christophe

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 15 May 2023, 03:54 PM

Hello Christophe,

This is not coming out of the box but you can achieve it by using a template for the header and then targeting the header by the id of the template container. For example:

  header: {
      template: kendo.template($("#headerOne").html())
  },
...
<script id="headerOne" type="text/x-kendo-template">
    <div id="one">Item one</div>
</script>
..
$("#one").parent().css("background-color", "#ECFFDC");

Dojo demo: https://dojo.telerik.com/exeCUmuJ

Regards,
Nikolay
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
TileLayout
Asked by
Christophe
Top achievements
Rank 2
Answers by
Nikolay
Telerik team
Share this question
or