I have an angular 2 kendo grid component that looks like this
<kendo-grid [data]="gridView"
[selectable]="true"
[pageSize]="pageSize"
[skip]="skip"
[pageable]="true"
[sortable]="{ mode: 'multiple' }"
[sort]="sort"
(pageChange)="pageChange($event)">
<kendo-grid-column Title="Select">
<template kendoCellTemplate let-dataItem>
<input type="checkbox" (change)="onContactsSelect(dataItem.accountId, $event)"/>
</template>
</kendo-grid-column>
<kendo-grid-column field="accountId" title="{{result.accountColumn}}" ></kendo-grid-column>
<kendo-grid-column field="name" title="{{result.nameColumn}}"></kendo-grid-column>
<kendo-grid-column field="address" title="{{result.addesssColumn}}"></kendo-grid-column>
<kendo-grid-column field="state" title="{{result.statusColumn}}"></kendo-grid-column>
<kendo-grid-column field="customField1" title="{{result.customField1Column}}"></kendo-grid-column>
<kendo-grid-column field="customField2" title="{{result.customField2Column}}"></kendo-grid-column>
<kendo-grid-column field="timeStamp" title="{{result.timeStampColumn}}"></kendo-grid-column>
<template kendoDetailTemplate let-dataItem>
<section *ngIf="!dataItem.isValid">
<article>{{dataItem.errorMessage}}</article>
</section>
</template>
I do want to show the detail row (and the details k-plus and k-minus signs to toggle between open and closing the detailed row) only when there is an error message or only when the dataitem is invalid.
Right now the toggle buttons appear on all rows regardless of the dataitem is valid or not.
Any pointers would be helpful.