2
votes

I have a DataGrid where one of the columns has a labelFunction. When I run the application a scrollbar shows up in the DataGrid indicating to me that it has data but there is nothing in the DataGrid. When I scroll items start showing up. When I Debugged it I noticed that the labelFunction was never being called until I started scrolling. Does anyone know why this is happening?

1
did you use validateNow() after you assign the dataprovider? - Treby
Can you provide a code sample? How are you setting the labelFunction? In MXML? - JeffryHouser
which of the two functions did the trick? - Amarghosh

1 Answers

2
votes

If you are assigning labelFunction at a later time using ActionScript after setting the dataProvider, try calling datagrid.invalidateList() or datagrid.updateList() after assigning it - these functions force a refresh of all the rows.