Detail Template Events

2019-09-15 15:42发布

Does Kendo support grid events when users interact with Detail Templates. Specifically, I am looking to load the data for the detail template when a user opens an individual row.

The best solution I have is to place a click event handler on the grid and verify the target corresponds to the button that opens/closes the detail template. However, this seems complicated and error-prone if the kendo representation changes.

1条回答
够拽才男人
2楼-- · 2019-09-15 16:33

You can wrap the detail template in your custom component and use the Angular lifecycle hooks to fetch your content. It should be something like:

<template kendoDetailTemplate let-dataItem>
  <data-fetch-component *ngIf="dataItem.Category">
    <header>{{dataItem.Category?.CategoryName}}</header>
    <article>{{dataItem.Category?.Description}}</article>
  </data-fetch-component>
</template>
查看更多
登录 后发表回答