Unqualified
Unqualified

Reputation: 3

kendo-ui-angular2 grid detail "+" click event

How to tap in to the click event of the "+" expand "-" collapse click events. Clicking on the row triggers the "cellClickHandler($event)", I need it to be able to handle detail click as an event also.

<kendo-grid
    [data]="mainData"
    (cellClick)="cellClickHandler($event)"
>
  <kendo-grid-column>
    // column stuff
  </kendo-grid-column>
  <kendo-grid-column>
    // more column stuff
  </kendo-grid-column>
  <ng-template kendoGridDetailTemplate>
    <table>
      // stuff
    </table>
  </ng-template>
</kendo-grid>

Upvotes: 0

Views: 1222

Answers (1)

Philipp
Philipp

Reputation: 1884

You can utilize the detailCollapse and detailExpand events from the kendo-grid component.

Example (Plunker)

<kendo-grid
    ...
    (detailCollapse)="collapseHandler($event)"
    (detailExpand)="expandHandler($event)"
>
    ...
</kendo-grid>

Detailed information on all available events can be found in the Grid API section.

Upvotes: 1

Related Questions