all groups > flash data integration > march 2006 >
You're in the

flash data integration

group:

Column count for list box won't change


Column count for list box won't change almcnicoll
3/30/2006 3:47:59 PM
flash data integration:
I'm using a static XML set to populate a list box. Because I want to control
which columns (fields) are visible and which rows (records) are displayed, I'm
parsing the XML into an array of objects with the required properties. An
example of the array could be:

dp ==

This displays the data just as I want it.
Then, depending on filter/sort combos within the movie, I want to change the
display. The user has filtered/sorted on columns Matriculation Year and Status
(both of which are in the original static XML). The newly generated array looks
like this:

dp ==

However, when I set

myListComponent.dataProvider = dp;

the number of columns remains fixed at one. I can only view the FullName and
not MatriculationYear or Status. I looked through LiveDocs and through the
actionscript class "List.as" in search of a method that would cause it to
reevaluate the column count, but have come up dry. Any help would be really
appreciated...

Thanks,

Al McNicoll
Integritec Ltd
Re: Column count for list box won't change almcnicoll
3/30/2006 3:54:53 PM
Answered own question:

Calling
listComponent.init();
seems to work. It hadn't worked before because I was trying to call
listComponent.dataProvider.init(), which was a stupid mistake to have made!
AddThis Social Bookmark Button