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

MultiSelect: Nested Property Binding not working

2 Answers 390 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jayaram Krishnan
Top achievements
Rank 1
Jayaram Krishnan asked on 18 Jan 2018, 12:53 PM

Hi,

I noticed that binding text field to a nested property on the data does not display the value as expected.As an example, I bind my widget to an array of Article objects, and each article has translation property of type ArticleTranslation. ArticleTranslation has title property of type string, which my widget is bound to.

Here is my plunker:

https://plnkr.co/edit/DQ3ezkJ60GqVHNQ8kmVK?p=preview

 

Thanks

Madani

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Topalov
Telerik team
answered on 18 Jan 2018, 01:18 PM
Hello Madani,

Indeed, binding to a nested property in the described manner is not supported, but you can use Tag and Item templates to successfully display the nested property's value, e.g.:

<ng-template kendoMultiSelectTagTemplate let-dataItem>{{dataItem.translation.title}}
        </ng-template>
        <ng-template kendoMultiSelectItemTemplate let-dataItem>{{dataItem.translation.title}}
        </ng-template>

https://plnkr.co/edit/ONdCw3FxzVp7tV3WQPUY?p=preview

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Jayaram Krishnan
Top achievements
Rank 1
answered on 18 Jan 2018, 03:40 PM
Thanks Dimiter. That did it.
Tags
General Discussions
Asked by
Jayaram Krishnan
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Jayaram Krishnan
Top achievements
Rank 1
Share this question
or