I am having my Json structure which is in the given below format.
I want the data to be populated in
OCTOBER
Mahanavami
Moharram
DECEMBER
Nabi Dinam
So i had tried with a repeater inside a repeater which did not work out .So I have added a List view inside a repeater
it is showing error " Binding error while setting property items of Repeater".
Js:
var schoolCalender = [
{
"name": "OCTOBER",
"names": [
{
"date": "10-10-2016",
"dayType": "Full Holiday",
"desc": "Mahanavami",
"monthName": "OCTOBER",
"day": 10
},
{
"date": "11-10-2016",
"dayType": "Working Day",
"desc": "",
"monthName": "OCTOBER",
"day": 11
},
{
"date": "12-10-2016",
"dayType": "Full Holiday",
"desc": "Moharram",
"monthName": "OCTOBER",
"day": 12
}
]
},
{
"name": "DECEMBER",
"names": [
{
"date": "13-12-2016",
"dayType": "Partial Holiday",
"desc": "Nabi Dinam",
"monthName": "DECEMBER",
"day": 13
}
]
}
],
page.bindingContext = {myItems: schoolCalender};
Xml:
<StackLayout orientation="vertical" height="auto">
<Repeater items="{{ myItems }}" >
<Repeater.itemsLayout>
<WrapLayout />
</Repeater.itemsLayout>
<Repeater.itemTemplate>
<StackLayout>
<Label cssClass="sMood" text="{{ name }}"/>
</StackLayout>
<ListView items="{{myItems.names }}" height="400">
<ListView.itemTemplate>
<WrapLayout orientation="vertical" style="background-color:#eee;padding-top:15;">
<StackLayout orientation="horizontal" cssClass="containerCalender">
<Label text="{{ day}}" cssClass="dateBox" />
<Label text="{{ desc }}" cssClass="eventText" />
</StackLayout>
</WrapLayout>
</ListView.itemTemplate>
</ListView>
</StackLayout>