Hi;
I have a DataGrid inside a Repeater:
I try to adjust the height of my DataGrid depending on the number of
lines provided by my DataProvider (bijslagLines is a XMLList).
How can I count the number of elements provided by my DataProvider in
this case ? I wrote this code, but sometimes it send errors ("Error:
Repeater is not executing. at mx.core::Repeater/get currentIndex()
...").
<mx:Repeater id="REPEATKIND" dataProvider="{bijslagLines}">
<mx:Panel styleName="panelNoHeader">
<mx:LinkButton label="[EMAIL PROTECTED]" />
<mx:DataGrid id="KINDTABLE"
dataProvider="{REPEATKIND.currentItem.line}"
rowCount="{KINDTABLE[REPEATKIND.currentIndex].dataProvider.length}">
<mx:columns>
<mx:DataGridColumn dataField="maand052005" />
<mx:DataGridColumn dataField="maand062005" />
...
</mx:columns>
</mx:DataGrid>
</mx:Panel>
</mx:Repeater>
Here is the content of bijslagLines:
<kind naam="Vestdijk Jerome">
<line>
<type/>
<maand052005>3/3</maand052005>
<maand062005>3/3</maand062005>
</line>
<line>
<type>Basiskinderbijslag - tarief 01</type>
<maand052005>77,05</maand052005>
<maand062005>77,05</maand062005>
</line>
</kind>
<kind naam="Vestdijk Benoit">
<line>
<type/>
<maand052005>3/3</maand052005>
<maand062005>3/3</maand062005>
</line>
<line>
<type>Basiskinderbijslag - tarief 02</type>
<maand052005>142,58</maand052005>
<maand062005>142,58</maand062005>
</line>
<line>
<type>Basiskinderbijslag - tarief 01</type>
<maand052005/>
<maand062005/>
</line>
</kind>