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

DataItem does not exist

1 Answer 128 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kowshik
Top achievements
Rank 1
Kowshik asked on 01 Mar 2021, 09:36 PM

Hello,

 

I'm using Angular Master Detail Grid to build a hierarchical Data table. I followed https://www.telerik.com/kendo-angular-ui/components/grid/master-detail/ this article and getting the following error while running the app:

 

Error: src/app/app.component.html:25:83 - error TS2339: Property 'dataItem' does not exist on type 'AppComponent'.

25     <div *kendoGridDetailTemplate="let dataItem, let rowIndex = rowIndex; showIf: dataItem.skuMessageList">

  src/app/app.component.ts:9:16
    9   templateUrl: './app.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component AppComponent.

 

This is the code Snippet - 

<div *kendoGridDetailTemplate="let dataItem, let rowIndex = rowIndex; showIf: dataItem.skuMessageList">
      <child-sku [Sku]="dataItem.skuMessageList"></child-sku>
</div>     

Any help would be appreciated.

 

 

1 Answer, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 03 Mar 2021, 03:16 PM

Hi Kowshik,

One possible reason for this not to work, is that showIf option accepts function from AppComponent which is then invoked with parameters - dataItem: any, index: number as demonstrated in this stackbltiz sample.

Please let us know if that worked for you.

Regards,
Ivan
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/.

Tags
Grid
Asked by
Kowshik
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Share this question
or